Our MVC website is very slow and I’d like to know how I can find the bottleneck. I use FireBug and I see that the request takes 15 seconds on the server. When I hit refresh, it takes about 3 seconds. I’d like to know how this is possible. What causes the 12 seconds?
Also, I think 3 seconds is also too long because the page I am requesting shows 25 records (from the database), a menu and some user info.
I’ve used the NHibernate profiler and I don’t see any query that takes a long execution time. It’s all a few ms.
Specs:
- The site is build with MVC 2
- We use Ninject
- We use NHibernate
- .NET 3.5
- We use a lot html.RenderPartial()
- SQL Server Express
- Log4Net
I hope that someone can help me to find the bottleneck(s). I don’t know what I can try.
Use the Visual Studio profiler :
http://www.slideshare.net/AbhijitJana1/tune-your-aspnet-application-using-visual-std
http://msdn.microsoft.com/en-us/magazine/cc337887.aspx
http://www.youtube.com/watch?v=Mcs9VqreEps
Update (Reflecting on comment that OP have VS that doesn’t have profiling feature) :
You can use EQATEC .NET profiler, it’s free for personal use :
http://www.eqatec.com/tools/profiler/