对许多组件坏? [英] Are to many assemblies bad?

查看:180
本文介绍了对许多组件坏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个小小的问题。在很多软件架构,例如多层次或类似的企业库,我扩大外部组件一些code。有时候我的项目包括每个解决方案的更多然后20​​集。现在我很困惑...... 20集到多少?如果是的话,我可以在逻辑不同的部分一个大项目吗?如果我实现了企业库,我normaly有5个组件最低限度。

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 my project includes more then 20 assemblies per solution. Now I'm confused... Are 20 assemblies to much? If yes, what I can do in a large project with different "sections" of logic? If i implement the enterprise library, I normaly have 5 assemblies minimally.

推荐答案

二是组件从一个问题很长,很长的路要走。只是为了对比,当我在Visual Studio中看看现在,我看到有装载249集吧。没有什么特别麻烦约VS我的机器上,它并没有使用大量的内存(MB 283现在),并在一两秒钟。

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.

在CLR不花重资源跟踪组件一般。唯一的可能的有很多他们的缺点是,它会影响你的程序的冷启动。如果你的程序初始化没有得到很好的优化(V​​S是的的优化),如果你需要从一个缓慢的主轴驱动运行那么那些20集可以花费你的脚攻的第二身价。只有事项,当然互动节目。 ILMerge将是一个解决办法。

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.

这篇关于对许多组件坏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆