DLL 数量和加载性能
假设整个dll大小为100M,这里有2种情况:
- 100M * 1
- 10M * 10
当使用许多小尺寸的DLL时,它们对性能影响大吗? 为什么?
我们最近做了一次测试,但没有发现这两种情况之间有太大的性能差异,我不确定我的测试是否有一些错误的步骤,或者这就是事实。
Suppose the overall dll size is 100M, here are the 2 cases:
- 100M * 1
- 10M * 10
Will their be much performance impact when using many small sized DLLs? why?
We did a testing recently but didn't detect much performance difference between the 2 cases, I am not sure if there are some wrong steps with my testing or this is the fact.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用多个 DLL 时,您可能遇到的唯一问题是轻微的启动问题,因为操作系统加载程序必须找到 DLL 并解析和引用这些 DLL,并在加载它们时对其进行变基。 然而,性能影响并不值得担心,特别是如果您有 10M*10 DLL
The only hit you're likely to get with multiple DLLs is a slight startup hit as the OS loader will have to locate the DLLs and resolve and references these DLLs have and rebase them as they're loaded. However, the performance impact is not worth worry about, especially if you've got 10M*10 DLLs
我想如果您没有足够的可用内存,您只会看到差异。 在这两种情况下,操作系统都应该处理 DLL,它们也应该被缓存,因此如果存在差异,则只对第一次加载有影响。
I guess you'd only see a difference if you haven't got enough free memory. In both cases, the OS should take care of the DLLs, they should also be cached so if there is a difference, it should only matter for the first load.