如何改善 dll 加载时间 .net

How to improve dll loading time .net

我创建了一个 dll,它的大小是 4 mb。问题是当我调用 dll 时需要 6 - 7 秒。任何人都有同样的问题。请提出任何解决方案。

我在 asp.net 网络应用程序中引用了这个 dll。在按钮单击事件中,我从这个 dll 实例化了一个 class,这里需要 6-7 秒。

请注意,在本地它工作正常,但在生产服务器(Windows Server 2008 R2)上我遇到了这个问题。

感谢您的建议。

通常取决于您编码的方式。如果你使用 ants 分析器,它可以告诉你什么方法或对象正在占用你的内存和时间。如需进一步了解,请阅读这些帖子

  1. http://www.codeproject.com/Articles/3980/Dll-Profiler-in-C
  2. Which .NET performance and/or memory profilers will allow me to profile a DLL?
  3. Any tool to detect which dll is leaking memory?