PHP includes causing webpage to load slowly

Discussion in 'PHP' started by NewComputer, Jul 27, 2006.

  1. #1
    I have a site pulling in a php include and it is causing the page to load slowly. The include is a fair amount of data and I would like the page to load and then have the php include loads marginally after. Does this make sense? Is there a way to make it load faster?
     
    NewComputer, Jul 27, 2006 IP
  2. clancey

    clancey Peon

    Messages:
    1,099
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I think you need to look at the projects from ZEND or PHPLens and some other people who have worked on ways to speed up loading of PHP pages. As I understand it, they compile the page and store that so that the next time it is called, they can call the compiled version, which should speed things up.

    To call the scripts in bits, you would need to look hard at it and see if it can be rewritten into smaller s parts which are only called if and when necessary.

    Thirdly, you should look at something the ADODB or ADOBD-Lite to speed iup the database part of the operration if there is a lot of database quesries involved.

    There is a good general dicssuion on php optimistzation at PHPLens
     
    clancey, Jul 27, 2006 IP
  3. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #3
    How much data is it pulling in? What sort of data is it? a php include is done when the page is requested so you can't do it afterwards.
     
    mad4, Jul 28, 2006 IP
  4. NewComputer

    NewComputer Well-Known Member

    Messages:
    2,021
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    188
    #4
    It turns out it was a server issue.
     
    NewComputer, Jul 28, 2006 IP
  5. emac

    emac Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    try looking for caching scripts... loads faster the next time around..
     
    emac, Jul 30, 2006 IP
  6. NewComputer

    NewComputer Well-Known Member

    Messages:
    2,021
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    188
    #6
    What am I looking for? Examples?
     
    NewComputer, Jul 31, 2006 IP
  7. coderlinks

    coderlinks Peon

    Messages:
    282
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0