Asp.net应用程序中Excel对象的内存使用情况 [英] Memory Usage of Excel object in Asp.net applications

查看:67
本文介绍了Asp.net应用程序中Excel对象的内存使用情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个ASP.NET应用程序,用于报告.在此应用程序中,正在创建许多excel对象.它影响了应用程序的性能.因此,我需要做一个POC来找出excel objet消耗了多少内存.

请问有人可以帮我指点一下如何使用CLR事件探查器分析不同对象的内存消耗(我对excel对象使用多少内存很感兴趣.)

谢谢,
Subheesh Paul

We have an ASP.NET application,which is used for reporting. In this application lots of excel objects are being creating. It is affecting the performance of the application. So I need to do a POC to find out how much memory an excel objet is consuming.

Could some one please help me to give me a pointer tohow to use CLR profiler to analyze the memory consumption of different objects(I am interested in how much memory is used by the excel object.)

Thanks,
Subheesh Paul

推荐答案

[^ ]应该会有所帮助.

顺便说一句,一旦使用完创建的对象,就应该对其进行处置.您可以使用Marshal.ReleaseComObject方法(对于excel interop对象)执行此操作.
This[^] should help.

BTW, you should dispose the objects you have created whenever you are done using them. You can do this using Marshal.ReleaseComObject method (for excel interop objects).


如果您有兴趣了解CLR分析服务而不是CLR分析器工具-请看一下此处.
If you are interested in having a look at the CLR profiling services rather than the CLR profiler tool - have a look here.


这篇关于Asp.net应用程序中Excel对象的内存使用情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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