PHP slow to execute

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Useful Info

    PHP slow to execute

    Hi all,

    I have some PHP pages at http://muvy.org which is exhibiting
    some strange slowness. It is hosted by secureserver.ne t (bad?).

    When I time how long it takes to load the main web page from the
    server
    it averages 7 seconds, but often goes to 15.

    When I store the main page on my hard drive, the load time is 1
    second.

    I've tried removing PHP code that might slow things down
    but that only brings the load time down to 5.5 seconds best case.

    I have other PHP pages on the same server that seem to execute
    faster. The key difference between the slow main page and the faster
    pages is the faster pages do not use "include" to execute code in
    other
    PHP files.

    However with out "include" and the modularity it affords, my PHP code
    would be harder to maintain. What to do?

    Any insights appreciated.

  • Sanders Kaufman

    #2
    Re: PHP slow to execute

    Useful Info wrote:
    I have other PHP pages on the same server that seem to execute
    faster. The key difference between the slow main page and the faster
    pages is the faster pages do not use "include" to execute code in
    other
    PHP files.
    >
    However with out "include" and the modularity it affords, my PHP code
    would be harder to maintain. What to do?
    >
    Any insights appreciated.
    Without seeing the code, that's a tough one.

    Comment

    • Michael Fesser

      #3
      Re: PHP slow to execute

      ..oO(Useful Info)
      >I have some PHP pages at http://muvy.org which is exhibiting
      >some strange slowness. It is hosted by secureserver.ne t (bad?).
      >
      >When I time how long it takes to load the main web page from the
      >server
      >it averages 7 seconds, but often goes to 15.
      Way too much for a normal page.
      >When I store the main page on my hard drive, the load time is 1
      >second.
      >
      >I've tried removing PHP code that might slow things down
      >but that only brings the load time down to 5.5 seconds best case.
      >
      >I have other PHP pages on the same server that seem to execute
      >faster. The key difference between the slow main page and the faster
      >pages is the faster pages do not use "include" to execute code in
      >other
      >PHP files.
      I can include a hundred files without any problems. But without seeing
      some code it's impossible to find the bottleneck. Try some debugging
      output (current time) at various parts of your scripts to see which part
      takes the most time.

      Even better (but usually not possible on a shared host) would be to use
      a profiler.
      >However with out "include" and the modularity it affords, my PHP code
      >would be harder to maintain. What to do?
      What PHP version are we talking about? What API is used - server module,
      CGI, FastCGI?

      Micha

      Comment

      • Rik

        #4
        Re: PHP slow to execute

        On Sat, 21 Jul 2007 18:11:39 +0200, Useful Info <useful_inf@yah oo.com>
        wrote:
        I have some PHP pages at <snip URL>
        Hmmz, first spam a group, then ask for help? I don't think so.
        --
        Rik Wasmus

        Comment

        • Toby A Inkster

          #5
          Re: PHP slow to execute

          Useful Info wrote:
          I have some PHP pages at http://muvy.org which is exhibiting
          some strange slowness.
          You are one of the most prolific spammers on Usenet today. Why would we
          help you?

          --
          Toby A Inkster BSc (Hons) ARCS
          [Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
          [OS: Linux 2.6.12-12mdksmp, up 30 days, 21:31.]

          Parsing an HTML Table with PEAR's XML_HTTPSax3

          Comment

          • Jerry Stuckle

            #6
            Re: PHP slow to execute

            Toby A Inkster wrote:
            Useful Info wrote:
            >
            >I have some PHP pages at http://muvy.org which is exhibiting
            >some strange slowness.
            >
            You are one of the most prolific spammers on Usenet today. Why would we
            help you?
            >
            Maybe he thinks we're as dumb as he is and won't remember what a spammer
            he is.

            But then spammers never were very smart.

            --
            =============== ===
            Remove the "x" from my email address
            Jerry Stuckle
            JDS Computer Training Corp.
            jstucklex@attgl obal.net
            =============== ===

            Comment

            Working...