Do including files slow the asp processing down?

Results 1 to 3 of 3

Thread: Do including files slow the asp processing down?

  1. #1
    Join Date
    Dec 1969

    Default Do including files slow the asp processing down?

    I&#039m writing a site that&#039s going to have a *lot* of hits, or at least that&#039s what I&#039m being told. To prepare, I&#039ve been trying to ahere to all the guidelines out there for fast ASP/SQL coding. However, I have one question I can&#039t seem to find the answer to... do !--#include files slow down the processing of the page? It would seem to because it would have to access additional files, and assemble it all... two extra steps before it runs the code... but I could be wrong. Any ideas?<BR><BR>Thanks!<BR>Ben

  2. #2
    Shadao Shai Guest

    Default Yes - a little

    Include files do use additional processing power but the cost is relatively cheap. The use of includes should be restricted to code that you want to reuse across multiple pages. For example if you have a DB function that you want to use across multiple pages, an include file for this function would be appropriate. This solution is far superior to one where the code is placed in each page. If you have to change this function, you would have to do a site wide search and replace. Not a good solution.<BR><BR><BR>Here&#039s a good article on ASP performance and it has a section on the impact of using includes:

  3. #3
    manual Guest

    Default RE: Do including files slow the asp processing dow

    Well, of coarse there are pros and cons. You would want to use an include file if you used a couple of pieces of code on almost ever page. For example to connect to a database or a function that you use a lot.<BR><BR>To make a mental picture. All an include file does is take whatever is in it and puts in on the page that you included it to. So if you put a lot of code that you only use on one or two pages in the include file that code would be added to every page that used the include file. So the rule of thumb for an include file is: the smaller the better.<BR>

Posting Permissions

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