Re: PHP performance profiling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




----- Original Message -----
From: "Eric Butera" <eric.butera@xxxxxxxxx>
To: Gryffyn <gryffyn@xxxxxxxxxxxxxxxxxxxxxx>
Cc: php-general@xxxxxxxxxxxxx
Date: Tue, 18 Nov 2008 12:16:04 -0500
Subject: Re:  PHP performance profiling

> On Tue, Nov 18, 2008 at 10:11 AM, Gryffyn
> <gryffyn@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> > I did a search and didn't find anything really astounding sounding, so I
> > wanted to ask for some "live" recommendations from the crowd here.
> >
> > I was wondering if anyone had used FirePHP with Firebug or could 
recommend a
> > good profiling method for figuring out where the slow parts of your PHP
> > code are.
> >
> > I'm curious about solutions that don't require installing something on the
> > server side, since that's not usually an option with shared web hosting 
and
> > all.
> >
> > I used to love Zend Studio's server component along with the IDE, but it
> > doesn't help so much with shared web hosts where you can't install the
> > server component.
> >
> > Ideally, I'd love to see what segments of the code are running slow, but 
at
> > the very minimum, I want to see if it's the PHP code or the MySQL calls
> > that are slow.   I know I can just add my own statements in the code, but 
I
> > was hoping there was a more comprehensive solution available.
> >
> > Thanks in advance.
> >
> > -TG
> 
> If you cannot install stuff on your server, set yourself up a local
> dev environment.  You should really be doing this anyways.  One of the
> easiest ways to do this is to download a pre-made vmware player server
> application.  Or you could do the xampp thing.
> 
> Once you have that you can use xdebug [1] to profile your code.  It
> has a lot of various ways of profiling.  It doesn't require you
> modifying your code at all.  Then it generates these files that you
> can use kcachegrind/wincachegrind to see every single function your
> script calls, how long it took, etc.  There's also another tool to
> view these files called webgrind[2]
> 
> [1] http://www.xdebug.org/docs/profiler
> [2] http://code.google.com/p/webgrind/
> 

I'm not as worried about profiling the code itself as it's execution in it's 
final environment.  So setting up a test on my local machine isn't going to 
give me what I want.  It's a good idea, and I definitely use VMWare 
appliances for a few things (particulary testing in various browser 
versions that don't always like to be installed next to each other).

I forgot about xdebug and haven't checked out webgrind yet.  Thanks for the 
recommendations!

And thanks to Nathan for the other recommendations.

To get really good profiling feedback, control of the server is probably 
necessary.  But if there was something that got me close without messing 
with the server, I figured it was worth asking about.

-TG

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux