Are to many assemblies bad?

后端 未结 1 1088
时光说笑
时光说笑 2021-01-24 08:58

I\'ve one little question. In many software architectures, for example multi tier or something like the enterprise library, I expand some code in external assemblies. Sometimes

相关标签:
1条回答
  • 2021-01-24 09:36

    Twenty assemblies is a long, long way from a problem. Just for comparison, when I look at Visual Studio right now, I see it having 249 assemblies loaded. Nothing particularly troublesome about VS on my machine, it does not use a lot of memory (283 MB right now) and starts up in a second or two.

    The CLR does not spend heavy resources keeping track of assemblies in general. The only possible disadvantage of having a lot of them is that it can affect the cold-start of your program. And if your program initialization is not well optimized (VS was heavily optimized) and if you need to run from a slow spindle drive then those 20 assemblies can cost you a second worth of foot tapping. Only matters on interactive programs of course. ILMerge would be a workaround.

    0 讨论(0)
提交回复
热议问题