 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
PHPBuilder.com: Profiling PHP Code with Xdebug and KCacheGrind
by Chris Cornutt December 31, 2010 @ 12:09:07
New on PHPBuilder.com today there's a tutorial on profiling your applications with the help of XDebug and the KCacheGrind tools.
[Eventually you'll want to seek out and resolve any bottlenecks.] Which brings us to the question of how to even go about determining which parts of an application could conceivably be optimized. One common approach involves using a profiler such as Xdebug, which can analyze your code and produce performance reports. These reports can then be reviewed within a profiling visualization tool such as KCacheGrind. In this article I'll show you how to use Xdebug and KCacheGrind to begin profiling and analyzing your PHP-driven Web applications.
He starts you from the beginning - installing both XDebug and KCacheGrind (unix-based, if you're on Windows try WinCacheGrind). He gives an example of a profile report based on a Zend Framework application and an example call graph output (as well as how some caching can help things quite a bit).
voice your opinion now!
profile tutorial xdebug kcachegrind
Affinity Bridge Blog: Code optimization with Xdebug and KCachegrind
by Chris Cornutt August 28, 2009 @ 10:04:53
On the Affinity Bridge blog today there's a great post looking at the use of Xdebug and KCachegrind to pinpoint bottlenecks and possible refectoring points in your code in a bit more visual way. They use an example from their own development - a script that took around twenty minutes to run.
By reducing the number of queries, making small code optimizations, and properly indexing and keying the legacy database we managed to cut the time to 10 minutes'"still we were way off target. To get a better look at what was going on, we thought it would be great to install Xdebug and take a look at it with KCacheGrind.
They show you how to get the full setup installed (on a Ubuntu system) - the LAMP stack, Xdebug and KCacheGrind. Complete commands to install, configure and run a sample debug session are all included. Sample outputs from the KCacheGrind software are there too: code structure, execution times.
voice your opinion now!
xdebug kcachegrind optimize
Andreas Gohr's Blog: Understanding PHP code better with Xdebug
by Chris Cornutt February 22, 2008 @ 09:14:00
Andreas Gohr has a new blog post today that talks about a way to really get to know your code better - use XDebug to see it from the inside out.
Xdebug is a PHP extension which helps you to understand, debug and profile PHP. It can help you to find bottlenecks or give you an quick overview what happens in code you aren't familiar with, yet.
The post gives a brief overview of the installation of the extension (building a shared module) and shows how to get started with profiling an application. He talks about the cachegrind tool you can use to parse the results and the kcachegrind app that will make the results a bit more visual.
As a bonus, he also throws in a bit about function tracing - picking out each small bit of functionality in the code (the function/methods) and gathering stats for each.
voice your opinion now!
xdebug profile tutorial install cachegrind kcachegrind profile trace
Zend Developer Zone: Profiling PHP Applications With xdebug
by Chris Cornutt January 01, 2008 @ 09:01:00
The Zend Developer Zone has posted the theird part of their series (by Stefan Priebsch) about working with XDebug in PHP to profile your applications.
In this week's issue, we will have a look at profiling. Profiling is a feature that seems to be similar to trace logging at first sight. Profiling logs, however, are not meant for human readability, and are not meant to visualize the program's control flow, but provide the data for a statistical analysis of the program run.
He includes an example of the profiling log his XDebug setup is generating and gives the settings you'll need to make a log of your own like php.ini settings to start it up and name it/place it where you want it.
He also talks about the method to get something useful out of the profiling logs - using WinCacheGrind or KCacheGrind to get an overview of what's going on "on the inside" of your application.
voice your opinion now!
profile application tutorial xdebug wincachegrind kcachegrind profile application tutorial xdebug wincachegrind kcachegrind
Internet Super Hero: PHP mysqlnd can't do wonders
by Chris Cornutt August 20, 2007 @ 07:49:00
On the Internet Super Hero blog today, there's this new post with a sort of retraction of some of the previous comments they've made on the mysqlnd drivers - really more proof that "mysqlnd can't do wonders".
Lastly, I've been blogging about positive performance related feedback on mysqlnd. Whenever I did so, I got some positive feedback - for obvious reasons: I was posting good marketing news. [...] As much as I'd love to, I can't stand behind a simple statement like "mysqlnd makes your applications faster". You must not assume that each and every application will profit from mysqlnd.
His target of choice was WordPress which he ran through a testing cycle with JMeter (a load and performance testing tool). In the end, though, using the mysqlnd drivers and the regular drivers didn't show much of a difference at all. To figure out why, he uses XDebug, APC and KCachegrind to work through where the issues might lie. Unfortunately:
I was not able to see any mysql_*-function in the call graphs. The reason is that the mysql_*-functions do not contribute to the overall runtime of this application in a major way.
voice your opinion now!
mysqlnd perfornace mysql driver jmeter xdebug apc kcachegrind mysqlnd perfornace mysql driver jmeter xdebug apc kcachegrind
|
Community Events
Don't see your event here? Let us know!
|