Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

Slow Rendering Page on First Access

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Wannabe - 06 Mar 2008 12:54 GMT
I have a page that take 10-15 seconds to load up the first time you access
it. Once the page loads, it runs super quick, but that initial hit (like
after an hour if no one has hit the page) takes a long time to come up.

Just to rule out databases, and any other external thing I could think of, I
tried creating a website that had nothing but one page. On that page, I put a
label that displayed the time when accessed. This page did exactly the same
thing as above.

Anyone got any suggestions on what I can try?
George Ter-Saakov - 06 Mar 2008 14:29 GMT
First time you hit your application your application is compiled and
Application_Init runs..
So depends on how big it is and how time consuming your Application_Init is
the delay is expected.

Also after some period of inactivity your application is unloaded. Hence if
will be recompiled and Init run again next time you hit it.

To speed things up you can do following....

1. Precompiled it. (if you using .NET 2.0) Google it up how to do it.
2. Disable unloading.... You need to have access to IIS management console
and go into the Pools under "IIS" tree.. There will be an option there...

George.

>I have a page that take 10-15 seconds to load up the first time you access
> it. Once the page loads, it runs super quick, but that initial hit (like
[quoted text clipped - 9 lines]
>
> Anyone got any suggestions on what I can try?
Wannabe - 06 Mar 2008 15:07 GMT
Thanks for the advice, but I have one question...

We have another server that our web apps do not do this, or it is not
noticeable, and we have never precompiled or stopped our apps from unloading.
Is there something else, or would you say that the servers are configured
separately. They are both the same model, speed, memory, etc.

Thanks

> First time you hit your application your application is compiled and
> Application_Init runs..
[quoted text clipped - 25 lines]
> >
> > Anyone got any suggestions on what I can try?
George Ter-Saakov - 06 Mar 2008 15:51 GMT
I would say, double check what you saying...
It's easy to see that application is not precompiled. But it's not that easy
to say that application is unloading or not.

you have to go and check in IIS Management console .NET Pool settings. And
since it's per pool and not application may be someone had set it for
another application and your application is benefiting form it without you
realizing it.

----------------Assuming you verified it and it's how you say it
is-------------
Something slows down your application on one machine and does not do it on
second machine..

My guess would be
1. Antivirus....NET create temp DLLs and with antivirus present it might
want to scan those DLLs before allowing them to be loaded into memory...

2. Different web.config. your machines might have different web.config
settings (debug is on for example) that would make a difference

3. Slow machine vs Fast machine... Even if you have same CPU/memory you
still might have some external processes that eat CPU time on one machine
and does not exist on another machine. Antivirus again is one of the
examples...

George.

> Thanks for the advice, but I have one question...
>
[quoted text clipped - 41 lines]
>> >
>> > Anyone got any suggestions on what I can try?

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.