Slow .NET Application Load

As of late, I have been having some speed issues in regard to the first page load of my .NET applications. I have looked for all possible solutions and have narrowed it down to the Application Pool settings and the worker processes having to be restarted every so often. The problem is that I have released numerous .NET apps, that are much larger in size and complexity, on this server and have never had the speed issues that I am having.

I understand the first load of any .NET page will require a compile. That is not the problem. I hit the page, and it compiles the first time, which takes 90 seconds or so. As soon as the application pool releases the worker process or becomes inactive/stops and I hit the page again it takes just as long to reload (90 seconds). I have also tried using the publish site option in VS 2005 to precompile the application, but have had no luck reducing the load time.

Secondly, I have tried to trace my solution and have had an odd result. I would expect one procedure to be taking most of the time, which would help me find where the problem lies. Instead, the time is even distributed across all activities.

Notes about Application:
Server is Running: IIS 6.0
Application Developed using: VS 2005 .NET 2.0
Debugging is turned OFF.
Tracing is now turned OFF.

Any help is appreciated.

RainMan
LVL 7
RainMan82Asked:
Who is Participating?
 
Computer101Connect With a Mentor Commented:
PAQed with points refunded (500)

Computer101
EE Admin
0
 
surajgupthaCommented:
>Time way be wasted in compiling for the first time
We can make sure that the first time compile is the reason by making a log entry on the entry point page_load. It will let us know how much time it truly took to compile

> Time distributed across activities
May be the page load is truly heavily loaded??
How are you tracking the time across activities??
0
 
RainMan82Author Commented:
I'm not familiar with adding log entries to the page_load...can you explain how?

The only way I have been tracking the time of activities is through the trace output when I turn tracing on.

Note that I have also tried "precompiling" my application and putting that up on the server with the same result.

RainMan
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
RainMan82Author Commented:
If I manually stop and start the application pool for this application I receive the same result, a first load of 90 seconds. So it makes me believe that it has something to do with the application compiling or hanging up on a process. The odd part is the 90 seconds. It is consistent over and over taking exactly 90 seconds to load. This makes me believe that something is either trying to hit the database and timing out or it is stuck on some process and timing out.

I have looked in both the event log, and have used file monitor to look for anything out of the ordinary, but have had no luck finding anything.

RainMan
0
 
surajgupthaCommented:
About the Log Entried i just meant tracing. How long does it take to reach the first line of code? You can check that by adding a trace on the first line of page load

About the manual start and stop . Are you having any code on Application_Start event??? How big is your project, is it HUGE?
0
 
RainMan82Author Commented:
Compile Load (First Time App Hit after Publish)
--------------------------------------------------------------------------------------------
Begin PreInit            
End PreInit      0.000146004335961516      0.000146
Begin Init      0.000325823778758103      0.000180
End Init      0.050641806434912      0.050316
Begin InitComplete      0.0507628326124707      0.000121
End InitComplete      0.0508170429173902      0.000054
Begin PreLoad      0.0508636825472156      0.000047
End PreLoad      0.050945774594717      0.000082
Begin Load      0.0509936535329458      0.000048
End Load      0.313252940795789      0.262259
Begin LoadComplete      0.313369594339521      0.000117
End LoadComplete      0.313434736229008      0.000065
Begin PreRender      0.313483331355905      0.000049
End PreRender      0.321381675708908      0.007898
Begin PreRenderComplete      0.321526682342282      0.000145
End PreRenderComplete      0.321663102261819      0.000136
Begin SaveState      0.329736440412887      0.008073
End SaveState      0.354145786459288      0.024409
Begin SaveStateComplete      0.354242391034698      0.000097
End SaveStateComplete      0.354377140206875      0.000135
Begin Render      0.354424432388122      0.000047
End Render      0.428016387130176      0.073592

Second Page Load after Above Compile
--------------------------------------------------------------------------------------------
Message      From First(s)      From Last(s)
Begin PreInit            
End PreInit      0.000146903886186403      0.000147
Begin Init      0.000205263555272723      0.000058
End Init      0.00346058157971374      0.003255
Begin InitComplete      0.003570142266996      0.000110
End InitComplete      0.00365462556491538      0.000084
Begin PreLoad      0.00370010138815484      0.000045
End PreLoad      0.00378636113597877      0.000086
Begin Load      0.00383350770657837      0.000047
End Load      0.0720218782694983      0.068188
Begin LoadComplete      0.0721269541488249      0.000105
End LoadComplete      0.0721857937937506      0.000059
Begin PreRender      0.0722323762579142      0.000047
End PreRender      0.075846558735021      0.003614
Begin PreRenderComplete      0.0759941453733565      0.000148
End PreRenderComplete      0.0760640093622254      0.000070
Begin SaveState      0.0829572670499283      0.006893
End SaveState      0.0847659659378944      0.001809
Begin SaveStateComplete      0.0848587134490309      0.000093
End SaveStateComplete      0.0850204555995384      0.000162
Begin Render      0.0850692211448233      0.000049
End Render      0.136012280909905      0.050943

After App Pool Stop/Start
--------------------------------------------------------------------------------------------
Begin PreInit            
End PreInit      0.000132851919364059      0.000133
Begin Init      0.000369196337083257      0.000236
End Init      0.10259905299149      0.102230
Begin InitComplete      0.102756440844326      0.000157
End InitComplete      0.102812964740651      0.000057
Begin PreLoad      0.102860535200026      0.000048
End PreLoad      0.103008297649736      0.000148
Begin Load      0.103059973250785      0.000052
End Load      1.15557773127825      1.052518
Begin LoadComplete      1.15574315468165      0.000165
End LoadComplete      1.15582080722229      0.000078
Begin PreRender      1.15586964826939      0.000049
End PreRender      1.34777308360208      0.191903
Begin PreRenderComplete      1.34791893477722      0.000146
End PreRenderComplete      1.35740428742463      0.009485
Begin SaveState      1.44025901329911      0.082855
End SaveState      1.46852011368417      0.028261
Begin SaveStateComplete      1.46864072891612      0.000121
End SaveStateComplete      1.48813408799198      0.019493
Begin Render      1.48826127296064      0.000127
End Render      2.4754417287759      0.987180
0
 
RainMan82Author Commented:
--About the manual start and stop . Are you having any code on Application_Start event??? How big is your project, is it HUGE?--

I do not believe that there is any code on the application_start event, where should I look to check this? The size of my project is actually pretty small. About 4 pages, no large data pulls from the database. No data pulls at all on the default page. Using controls from both Infragistics and Telerik, which I have always used and never have had issues with speed.

RainMan
0
 
surajgupthaCommented:
Are there other applications sharing the same application pool?
0
 
RainMan82Author Commented:
--Are there other applications sharing the same application pool?--

No. I created both a new virtual directory and and supplied it with its own application pool.

RainMan
0
 
surajgupthaCommented:
>> manually write to the trace using (add this as first statement to page_load)
Trace.Write("Before retrieving an item from ViewState"+DateTime.Now.ToString());
0
 
RainMan82Author Commented:
I have found the issue I am having. It is in regard to an Infragistics Toolbar control. When this control is added to my project a licenses.licx file is added as well. This license file is trying to retrieve style sheet and license info from Infragistics. I have completely removed this control and any reference to infragistics in my application and this has cured my problem.

Please Refund My Points.....Thank you for your help surajguptha

RainMan
0
 
surajgupthaCommented:
You are welcome
0
 
RainMan82Author Commented:
The problem was with the licenses.licx for Infragistics 7.1 controls. I downgraded my controls to the older version (6.2) and no longer have this issue. I believe that the somewhere in Infragistics 7.1 it is redirecting you to their web page to either verify licenses, get updates, or use resource files such as stylesheets. This would explain the 90 seconds I was seeing (most likely a timeout)...

RainMan
0
All Courses

From novice to tech pro — start learning today.