Performance problem

A

Arne

I have a 500 page ASP program that takes 1-2 seconds to
execute. For some strange reason it takes 20-30 seconds
before the first lines executes.
How can I make this program behave better?
 
A

Aaron Bertrand - MVP

How can I make this program behave better?

Train it? Positive reinforcement? Take away privileges?

Tough for us to guess, unless we know what it's doing. Though, 500 pages
seems grossly unorganized, and a PITA to manage.
 
P

Phill. W

Arne said:
I have ... ASP program that takes 1-2 seconds to execute.
... it takes 20-30 seconds before the first lines executes.

Not written in ASP.Net by any chance, is it?

If so, you're waiting for the Just-In-Time compiler to build your
code before actually starting to run it.
There's not much you can do about it, but read up on a utility
called "ngen".

HTH,
Phill W.
 
M

Michael D. Kersey

Arne said:
I have a 500 page ASP program that takes 1-2 seconds to
execute. For some strange reason it takes 20-30 seconds
before the first lines executes.
How can I make this program behave better?

Possible causes of delay include initialization code in:
- Application_OnStart code in global.asa,
- Session_OnStart event code in global.asa,
- the script,
- any COM+ component startup latency.

Does this occur only on the first execution of the script and not on
successive executions? Reason I ask is that the first time an ASP script
is executed it must be compiled to bytecode: the bytecode is cached in
IIS and on subsequent requests fetched and executed without any
compilation. Compilation is *very* CPU-intensive: if the script is
large, compilation may cause a perceptible time delay.

If this is the case, then a possible solution is to establish a
procedure to execute the page immediately after IIS startup, thereby
reducing the likelihood that a user would experience the delay.

Read more on the details of ASP caching and compiling in Appendix 3 of
http://www.microsoft.com/technet/prodtechnol/iis/iis5/maintain/optimize/iis5tune.asp?frame=true#h

Good Luck,
Michael D. Kersey
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,362
Latest member
ChandaWagn

Latest Threads

Top