Re: Can 'MInifying' vbscript provide performance gain?



Thank you Tim, this was very helpful. I was previously unable to find detail
on the contents of those cache's. From the description, minification would
have no effect on requests to the ASPScriptEngineCache because it is already
byte code.

Jason

"Tim Williams" wrote:

http://www.tech-archive.net/Archive/Internet-Server/microsoft.public.inetserver.asp.general/2004-04/1393.html

"Appendix 3: ASP Caching

The ASP Template Cache stores templates: pre-compiled ASP pages in text
format (#includes have been evaluated, and so on). Its size is governed
by the AspScriptFileCacheSize setting in the metabase, which defaults to
250. The ASP Script Engine Cache holds ASP templates that have been
compiled into byte code. Its size is governed by the
AspScriptEngineCacheMax setting in the metabase, which defaults to 125.
The relationship between the two is that an ASP page is cached once in
the template cache, but it can appear many times in the script engine
cache if it is being executed on many threads simultaneously. A site
with a lot of memory and a lot of distinct ASP pages that get hit often
will probably want to increase AspScriptFileCacheSize (monitor ASP
counters with System Monitor to diagnose). There is much less need to
increase AspScriptEngineCacheMax; the main reason would be that the
defaults are inadequate for machines with 8 or more processors.
AspScriptEngineCacheMax should have a metabase value that is equal to or
greater than the number of CPUs plus one, multiplied by
AspProcessorThreadMax. AspProcessorThreadMax defaults to 25.

Every process that hosts ASP will have its own ASP Template and Script
Engine Caches. By default that is just one process because ASP
applications run at medium isolation in the pooled Dllhost process.

When ASP gets a request for a page, it checks the ASP Template Cache
first. If there's an instance of that page cached there, the request is
forwarded to the Script Engine Cache. If the requested page is not in
the Template Cache, it is compiled into a template and forwarded to the
ASP Script Engine Cache. If an instance of the page is cached in the
Script Engine Cache and it is ready to run, that engine is run. Failing
that, if there is an instance of the page that is already executing, ASP
clones that running engine and executes the clone. This avoids the cost
of re-parsing the template into byte code. If there is no script engine
associated with the page, ASP takes the precompiled template from the
ASP Template Cache, creates a new script engine and has it compile the
template into byte code, and then executes it. When a page finishes
executing, the script engine is put at the head of the free list. If the
free list has grown larger than AspScriptEngineCacheMax, the
least-recently used script engine is destroyed. A hit in the script
engine cache means that ASP can avoid recompiling the template into byte
code.

Good Luck,
Michael D. Kersey
"

Tim


"Jason" <Jason@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F7D69E67-83B6-4224-9208-A892DF6D1D7D@xxxxxxxxxxxxxxxx
We are still running Microsoft Content Management Server 2001.

I am aware of the cache, but was unable to find more detail about that
intermediate code you mentioned. I figure at that point all includes are
put
in line, but I was wondering if any other preprocessing (I guess you might
call that psuedo-compilation) had been done. Do you if this intermediate
code
still has all the comments included?

There are definitly other options that would provide more benifit, we are
simply looking for any way to squeeze a little more performance out of our
aging system. We will be doing a full rewrite when a new technology is
selected but that is 1-2 years on the horizon.

THanks for the response.

-j


"Tim Williams" wrote:

What kind of "app" is it? I would guess it's not worth doing.
IIRC at least for ASP, script files are only parsed once and the cached
intermediate code used after that point.

Most likely there's still something else which would give better results.

Tim
.



Relevant Pages

  • Re: IIS Template Cache and Script Engine Cache
    ... Ok, I went and asked the ASP Dev about it, so I will share what I've ... The two concepts you are asking about is the "Template Cache" and "Script ... The "Template Cache" is a cache of the intermediate form of the particular ...
    (microsoft.public.inetserver.iis)
  • Re: IIS Template Cache and Script Engine Cache
    ... the templates in the template cache containing "other ... By this do you mean that the HTML that is in the asp page ... Cache" and "Script ...
    (microsoft.public.inetserver.iis)
  • Re: Can MInifying vbscript provide performance gain?
    ... "Appendix 3: ASP Caching ... The ASP Template Cache stores templates: ... The ASP Script Engine Cache holds ASP templates that have been ...
    (microsoft.public.scripting.vbscript)
  • Re: ASP Caching, how does it work?
    ... There are two levels of caching in ASP: ... The ASP Template Cache stores templates: ... The ASP Script Engine Cache holds ASP templates that have been ...
    (microsoft.public.inetserver.asp.general)
  • Re: IIS Template Cache and Script Engine Cache
    ... If an asp page is using vbscript and server-side jscript, ... Or will one script engine ... Cache" and "Script ... >be directly interpreted by a Script Engine to produce ...
    (microsoft.public.inetserver.iis)

Loading