Reply to Re: PHP slow to execute

Your name:

Reply:


Posted by Michael Fesser on 07/21/07 16:31

..oO(Useful Info)

>I have some PHP pages at http://muvy.org which is exhibiting
>some strange slowness. It is hosted by secureserver.net (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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация