How to identify bottlenecks in ASP to improve performance

Posted on 2009-07-07
Last Modified: 2013-12-07

We have a web application that takes too much time loading various pages.  I have a basic idea of what could be the problem like certain grids etc.  However, I'd like to identify what structures could be the culprits.

As an example of what I hope to achieve with ASP performance monitoring, one developer says the following concerning a .Net Windows application:

In the case of my application, as shown by the Performance Monitor snapshot (shown below), the native code (in blue) used memory sparingly, but managed code (in yellow) shot to the moon. The dumpheap command uncovered the following list of suspects (where the 3rd column is memory usage, in bytes):

Col 1            Col 2        Col 3                    Col 4
04eaec84    429440    29201920    TV8_Demo.clsRating
05f9092c     429440    30919680    TV8_Demo.BLstBaseRating
07f8dcfc      336132    44369424     Infragistics.Win.UltraWinGrid.UltraGridCell
790fd8c4   1310318    52389724    System.String
07e1fcb4     339952    89747328    Infragistics.Win.Appearance
7912d8f8    690781     96179680    System.Object[]
093d522c 102219 136564584 TV8_Demo.clsBookingDetail
010c340c 858880 147727360 System.Nullable`1[[System.Single, mscorlib]][]

He goes on to say:

... This structure was so insignificant that it didnt come immediately to mind when I saw the results of the dumpheap command  structures and value types arent identified separately in the heap, but are lumped into the objects which own them,such as clsBookingDetail, BLstBaseRating and clsRating in the above list.

Question:  How can I accomplish this same kind of performance monitoring with a Web application.  Can I still use dumpheap seeing the code behind is written in VB?

And how?


Question by:John500
  • 2
  • 2
LVL 14

Expert Comment

ID: 24804467
With .NET, there is no significant difference between winforms (desktop applications) and webforms (web applications), so whatever you can do with the one you could do with the other.

Your questions is way to generic to answer - it takes understanding your code and architecture to correctly identifying the bottlenecks. If I were you I would have started to think where the bottlenecks *might* be, and then run in debug mode and inspect the times it takes those parts to execute.

Just a small tip: usuaully bottlenecks are with the DB and the parts where the application accesses it. Make sure queries are well written, and whatever could be retrieved in the first call is indeed gathered there and no further queries are required for it.

Author Comment

ID: 24807830
Good stuff, appreciate it.

I would like to use the dumpheap command in questionable areas as you say.  Just as the article I posted a link to mentions - we too have heavy objects from Infragistics like their grids or editors etc.  I like to use the dumpheap command to see whether it's our class objects or queries or Infragistics.

Have you ever used this approach along with the Performance Monitor?
LVL 14

Accepted Solution

_Stilgar_ earned 500 total points
ID: 24808318
No. As dumb as it may sound, I usually trust my instincts and locate bugs and bottlenecks by using only debug mode and the code editor. Pretty much like hunting with no weapons and only using your fingers, but it works for me :-)

However, this really depands on your application and what bottlenecks you're experiencing. You may find that what you are after are actually network issues, DB connectivity, or improper use of a 3rd party component or code. Speed bottlenecks sometimes have nothing to do with memory usage...

Author Closing Comment

ID: 31600714
Thanks again

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to dynamically set the form action using jQuery.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now