Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extremely slow website on IIS

Tags:

c#

.net

iis

I'm trying to run a website locally, and it is very slow. Website uses DotNetNuke and IIS7. When I create a new blank website - it runs fast. This particular one is slow.

What have I tried:

  1. disabling IPv6 support in browser
  2. Change maximum worker processes in IIS
  3. I do not have AVG installed. And I disabled firewall and antivirus
  4. Remove Ipv6 support in Hosts file
  5. Turn off batch in Web.config

None of these helped

Also, my website is even 5 times slower to respond when I need to recompile my solution.

update, if this is helpful, this is my basic trace:

Trace Information
Category    Message From First(s)   From Last(s)
aspx.page   Begin PreInit       
aspx.page   End PreInit         3.87710342363437E-05    0.000039
aspx.page   Begin Init          6.42382822151184E-05    0.000025
aspx.page   End Init            3.07985958803876        3.079795
aspx.page   Begin InitComplete  3.07989531820756        0.000036
aspx.page   End InitComplete    3.07990824188564        0.000013
aspx.page   Begin PreLoad       3.07991584404922        0.000008
aspx.page   End PreLoad         3.07993180859273        0.000016
aspx.page   Begin Load          3.0799394107563         0.000008
aspx.page   End Load            116.812769734266        113.732830
aspx.page   Begin LoadComplete  116.81281078595         0.000041
aspx.page   End LoadComplete    116.812820288654        0.000010
aspx.page   Begin PreRender         116.812828270926    0.000008
aspx.page   End PreRender           205.25318815735     88.440360
aspx.page   Begin PreRenderComplete 205.253225407951    0.000037
aspx.page   End PreRenderComplete   213.774178871307    8.520953
aspx.page   Begin SaveState         215.060896371107    1.286717
aspx.page   End SaveState           215.279060220539    0.218164
aspx.page   Begin SaveStateComplete 215.279100892114    0.000041
aspx.page   End SaveStateComplete   215.279114576008    0.000014
aspx.page   Begin Render            215.279130160444    0.000016
aspx.page   End Render              217.466907021738    2.187777
like image 916
user194076 Avatar asked Feb 17 '12 18:02

user194076


2 Answers

Since it runs fast in production, but slow on your machine, it could be a connection to an external resource, ie database or other.

Enable Tracing in your application and then see where processing is taking too long. You can help narrow this down by adding trace messages throughout your application in places you think could be causing the issue.

You could also see if this occurs on another workstation, with a clean OS, to determine if it could be something on your local machine causing issues.

like image 73
AaronS Avatar answered Oct 05 '22 23:10

AaronS


You could grab the ANTS Performance Profiler from Red Gate and see if it points you in the right direction. There is a 14 day free trial, I've used this tool in the past to find bottlenecks and other issues and it is worth every penny.

like image 36
G_P Avatar answered Oct 06 '22 00:10

G_P