Performance Question for gurus

Results 1 to 3 of 3

Thread: Performance Question for gurus

  1. #1
    Join Date
    Dec 1969

    Default Performance Question for gurus

    I have an include file on every page of my site that includes commonly used functions (getusername(userid), etc.) for my site.<BR><BR>Slowly, this file has increased in size as the number of functions has increased.<BR><BR>I know this file is processed in some way by the server, even if the subroutines and functions are not called on that page.<BR><BR>How much of a drain is it to have 40 or 100 or 500 different subroutines that are never called on a page?<BR><BR>I think I asked this a year ago and was told it wasn&#039;t a big issue. Trying to confirm.

  2. #2
    Join Date
    Dec 1969

    Default RE: Performance Question for gurus

    given current cost per processor cycle not a lot, but then again in a web application every cycle counts (especially on a shared server)<BR><BR>if you can figure a better way, I&#039;d advise it. I use WSCs, personally, though they can be heavy in other ways

  3. #3
    Join Date
    Dec 1969

    Default It's a matter of memory...

    Since all ASP pages are compiled into a byte code form, and since then the byte code is cached, the unused functions have no impact on the performance of the page when it actually runs. They cause a hit at compile time, yes, but that will only happen once per page.<BR><BR>Unless...<BR><BR>Unless you have many, many different pages and "memory pressure" forces the engine to drop some of them from the cache. In which case then the whole schmear has to get compiled again.<BR><BR>But all this says it that the pages that are hit the most often *will* stay in the cache. And so will not take the compilation "hit". Only pages that are hit less often will need to be compiled before they run. And if a page is only hit once an hour...well, then who cares?<BR><BR>Having said all that... I think that over 100 unused subroutines is getting excessive. I&#039;d think seriously about chopping them up into logical groupings and then only #include the file that contains a group that you *need* on a given page.<BR><BR>How do you control that cache? I dunno.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts