White Space, Comments and Performance

Results 1 to 2 of 2

Thread: White Space, Comments and Performance

  1. #1
    CRT Guest

    Default White Space, Comments and Performance

    I was told today that white space and comments can slow down an ASP page. Is this true? I have only completed one ASP project, and I have NOT found this to be true.

  2. #2
    BalletChick Guest

    Default RE: White Space, Comments and Performance

    This is a good question. <BR><BR>When an ASP page is first requested (by any browser), it is loaded and parsed by the scripting engine(s). It is then stored in cache in an intermediate pseudo-compiled form (like p-code) to enhance speed. From that point on, as long as the script is in the cache and has not changed, it will execute from that p-code. You can set the amount of memory used by IIS for script caching (as well as timeout values), so you want to be sure you have set the value large enough to handle all of your scripts.<BR><BR>So... to answer your question, spaces and comments hurt (a VERY LITTLE BIT), but ONLY during the LOAD/PARSE stage. After that script is in cache, there is NO performance penalty.<BR><BR>Therefore, I personally consider the use of proper spacing and plenty of comments MANDATORY, and VERY GOOD PRACTICE, and I encourage it.

Posting Permissions

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