Profile WebParts for performance and memory

Profile WebParts for performance and memory

May 15th, 2006 // 3:05 pm @ Amar

I recently wanted to profile some of my Webparts to identify possible memory usage and speed issues. So I started to look for some profiling tools which I can evaluate and maybe ask my company to purchase in the long run. I tried three tools. Compuware Devpartner Community Edition, AQTime and ANTS Profiler. First of all, let me clarify that this was no proper review. I did not have ages to sit and setup and determine which one performed best. All I wanted was which tool would get the job done quick and easy.


Devpartner Studio installed properly, but resulted in a blue screen crash on my PC when I tried to configure it to profile ASP.NET application. Also tried to run my application in debug mode but did not seem to work. Maybe I was doing something wrong or maybe it was not working properly due to that crash, but anyways I did not bother with it much and uninstalled it. Too bad, as I have always admired Compuware tools. Will maybe patch my PC and see if I can get it working again sometime in the future. Not sure when I will get time.


AQTime was a bit complex to use. I had to create a project and set it to profile and ASP.NET application. Tried to tell it to profile only my webpart assembly but it kept on profiling the entire ASP.NET application including the sharepoint dll’s and .net stuff. Tried tweaking for sometime, but no prevail. I guess I will have to read the manual sometime. But one thing I observed, was that it gives a lot of details. But unless I can tell it to profile all the classes and code in just my webpart, I don’t think I can make any sense out of the results.


The last and the hero of these tests was ANTS Profiler. One of the easiest tools I have used. Hardly took any time, and I configured it successfully to profile just my webpart. Fired off the sharepoint page in a browser, used it a bit and closed it down and voila, my results were ready. It works in two modes. Memory profiling and performance profiling. In performance mode, it showed all the classes in my assembly and the amount of time each took, the number of hits each received etc. Does not display a lot of details, but is perfect for my work as all I needed was to optimise the most hit code in my project. So my winner for today is ANTS Profiler. I have heard about Microsoft CLR Profiler, but have not used it. Will give it a try maybe later, but not I have some code optimisations to do :)


Incidently, ANTS Profiler was the smallest of the three, around 6 MB installation. The other two were around 40MB+. I personally like lightweight quick to use utilities which get the job done instead of heavy duty state of art stuff which would take ages to configure and run. Will like to spend more time using ANTS profiler within the trial period I have to evaluate it better and see how good it is?


With this post by no means I am suggesting a proper review and evaluation of the above tools. It is just my first looks with these tools having spent no more than 15 mins on each. If someone finds better results, do let me know as I am interested in finding a good memory and performance profiling tool.


Update: Compuware just offered me a free 14 day trial of their full version. Will try it out when I have a little bit of time and report my findings in a later post someday.


Category : SharePoint & dotNet

3 Comments → “Profile WebParts for performance and memory”


  1. http://

    4 years ago

    If you really like lightweight and easy-to-install tools, you should try SpeedTrace Pro for .NET applications. It will make your life easier. You can find it here: http://speedtrace.ipcas.com.


  2. http://

    3 years ago

    Hi, I want to use ANTS profiler for profiling SharePoint site. Can you please send me the steps it requires to follow for profiling a particular webpart?

    Thanks in advance.


  3. http://

    2 years ago

    Here is the URL that lists down steps to configure ANTS profiler for profiling Sharepoint Web applications.

    http://www.red-gate.com/support/kb/KB200708000132.htm


Leave a Reply

Latest Posts

Testimonials

"Amar clearly has a thorough knowledge of Sharepoint, this knowledge, coupled with his professionalism and dedication made him a tremendous asset to the project. He was the key contributor to the later stages of the project delivery effort (the really difficult bit, long hours and hard work that puts huge demands on people), and I can state categorically that without his focussed dedication and hard work we would not have been able to meet the timescales imposed upon the project."

Tim Ellis , Sharepoint Project Manager , Royal Bank of Scotland

Subscribe Now