Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2001
    Posts
    161

    static content vs. include content in perl - effect on server performance?

    i had to add banner ad code to perl generated results page in about 8 seperate perl scripts.

    my options

    1. add the entire code in each of the 8 scripts
    2. add code which would open an external file (read it, print it)

    the advantage of option number 2 is that i can in the future edit that one external file (without having to edit all 8 scripts).

    i am curious if there if there is any difference on server performance with option 2 vs option 1.

    i know with php includes there is slight performance disadvantage compared to static pages but i have no idea about perl. anyone know the answer to this?

  2. #2
    Join Date
    Jan 2003
    Posts
    1,715
    Methods that requires system calls (file IO, network IO, file stats) will be slower than similar code that doesn't. (Last I heard, syscall overhead was about 1000 CPU instructions each.) If you plan to push this box to the red line, go for option 1. In most environments, though, the simplicity and modularity of option 2 will reduce the administrative overhead at minimal cost.
    Game Servers are the next hot market!
    Slim margins, heavy support, fickle customers, and moronic suppliers!
    Start your own today!

  3. #3
    Join Date
    Mar 2004
    Location
    Granville OH
    Posts
    108
    I agree with hiryuu. If you don't know if you need everything to be at its most efficient then chances are that you don't. Most servers these days are much more powerful than they need to be so generally ease of update and functionality are worth more than efficiency.

Posting Permissions

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