Poll: # of php includes currently used w/o noticable speed effects

Discussion in 'PHP' started by offthedome, Jun 6, 2007.

?

How many php includes do you currently use on any page without noticable speed effect

  1. 0-2

    1 vote(s)
    25.0%
  2. 3-4

    0 vote(s)
    0.0%
  3. 5-6

    1 vote(s)
    25.0%
  4. 7-8

    0 vote(s)
    0.0%
  5. 9-11

    0 vote(s)
    0.0%
  6. 12-15

    0 vote(s)
    0.0%
  7. More than 15

    2 vote(s)
    50.0%
  1. #1
    I'd like to know how many php includes you currently use on your pages without any noticable display spead effects.
     
    offthedome, Jun 6, 2007 IP
  2. mrmonster

    mrmonster Active Member

    Messages:
    374
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #2
    It doesn't matter how many includes you have, the speed of a page depends on what the code does.
     
    mrmonster, Jun 6, 2007 IP
  3. offthedome

    offthedome Active Member

    Messages:
    446
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    95
    #3
    It definitely depends on the server. I created a page for a customer that uses includes simply to display text, and it ran slowly.
     
    offthedome, Jun 6, 2007 IP
  4. dvd871

    dvd871 Guest

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It does depend on the server really. I have a AMD Sempron 2400+ server with 1Gb ram and 100Mbit connection and I run a browser based game site that has dozens of includes/requires and is mySQL driven and even with 10 - 15 people on at one time page loads are about 1 - 1.5 seconds even with 250+ mySQL queries per second. CPU usage is rarely more than 40%.
     
    dvd871, Jun 6, 2007 IP
  5. mrmonster

    mrmonster Active Member

    Messages:
    374
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #5
    Well you guys are just stating the obvious, of course the speed depends on the hardware its running on. But your question is specifically asking about the NUMBER of includes.

    If you don't cache, each include is just a disk seek and todays HDs can handle quite a few of them so the overhead is not significant in most cases. You can have a page that makes use of 30 includes and takes 1 second to process, or you can have a page with 1 include that takes 30 seconds to process. It all depends on what the code that the includes include is doing.
     
    mrmonster, Jun 6, 2007 IP
  6. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I wouldn't be surprised if the slow down in includes is due to this ridiculous 'fad' of including files via HTTP that seems to have gripped everyone. mrmonster is right: it's a disk seek, it's nothing. If you're including via HTTP (which is WRONG 99% of the time) then you'll see slowdowns pretty quickly...
     
    TwistMyArm, Jun 7, 2007 IP