By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,969 Members | 1,705 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,969 IT Pros & Developers. It's quick & easy.

PHP slow to execute

P: n/a
Hi all,

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.

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.

Jul 21 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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.
Jul 21 '07 #2

P: n/a
..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
Jul 21 '07 #3

P: n/a
Rik
On Sat, 21 Jul 2007 18:11:39 +0200, Useful Info <us********@yahoo.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
Jul 21 '07 #4

P: n/a
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
http://tobyinkster.co.uk/blog/2007/0...table-parsing/
Jul 21 '07 #5

P: n/a
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.
js*******@attglobal.net
==================
Jul 22 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.