You are here: Re: PHP Optimization question « PHP Programming Language « IT news, forums, messages
Re: PHP Optimization question

Posted by Jerry Stuckle on 01/13/08 14:13

IanReardon@gmail.com wrote:
> I'm trying to optimize a php project of mine and I'm running into some
> problems.
>
> Overall the page takes about .4-.5 seconds to render (just the code,
> i'm recording the time at start and finish of execution) on a my dual
> core server with nothing else running (other than httpd and mysqld)
>
> I've optimized my queries, total mysql query time is about .1 to .12
> seconds total.
>
> For some reason the part of my php that takes the longest to execute
> is a rather large section of html code with some <? echo $someVar; ?>
> sprinkled in. There is no logic or functional calls, yet this block
> of code (maybe 50 lines of HTML, takes around .3 seconds to execute.
>
> Can anyone recomend ways to find out where my php code is executing
> slow?
>
> Thank you
>

How do you know it's taking that long for the PHP to execute? I
wouldn't expect it to take very long to process the HTML code. You
didn't show us what echo statements you had, but I wouldn't expect a few
of those to take long, either.

There can be a lot of other things involved. For instance, during this
code, you may have filled the PHP buffers. This would have flushed the
buffers to your web server.

Now, flushing the PHP buffers to the web server could easily have filled
the web servers buffer. So now the web server has to flush its buffers
to the browser.

All of this takes time, also.

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

 

Navigation:

[Reply to this 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

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