469,916 Members | 2,036 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,916 developers. It's quick & easy.

Performance problem

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?
Jul 19 '05 #1
7 1248
A faster processor? Who can say without knowing what it's doing?

Ray at work

"Arne" <an*******@discussions.microsoft.com> wrote in message
news:12*****************************@phx.gbl...
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?

Jul 19 '05 #2
Is it doing much in the Session_onStart or Application_onStart?

"Arne" <an*******@discussions.microsoft.com> wrote in message
news:12*****************************@phx.gbl...
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?

Jul 19 '05 #3
> 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.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #4
"Arne" <an*******@discussions.microsoft.com> wrote in message
news:12*****************************@phx.gbl...
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.
Jul 19 '05 #5
> 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.


ah! progress<g>

been there; tried that; gone back!

Brian

Jul 19 '05 #6
Arne wrote:
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/pro...p?frame=true#h

Good Luck,
Michael D. Kersey

Jul 19 '05 #7

"Arne" <an*******@discussions.microsoft.com> wrote in message
news:12*****************************@phx.gbl...
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?


Is there any chance you could segment the program so that smaller pieces are
loaded and executed? I suspect that it would allow some "breathing space"
between each segment so other work could get done as well as if the "output"
is spread over those segments you might appear to get a faster response.

My response is speculation based on my background in computers and may NOT
be correction for VBscript/ASP...
--
Tom Miller
-------
If I knew what I was doing, would I be writing here?
Eileen Chat and 175,000 downloads at: www.chatnfiles.com
Jul 19 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Martin | last post: by
13 posts views Thread by bjarne | last post: by
17 posts views Thread by 57R4N63R | last post: by
30 posts views Thread by galiorenye | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.