[drupal-devel] Profiling memory consumption (was TCPHP goes for
matt at asitis.org
Sat May 28 15:44:11 UTC 2005
On Saturday 28 May 2005 01:43 am, Dries Buytaert wrote:
> I have been thinking about profiling Drupal's memory consumption.
> I'd like know where most memory is consumed. Is there an easy way to
> profile this?
I used Xdebug 2.0 (beta)  and KCachegrind to profile the path aliasing
patch a couple weeks back. Xdebug outputs a ' Callgrind Profile Format' file
which can be read into programs like KCachegrind  or WinCacheGrind .
It allowed me to see memory usage and the time spent in functions. The
memory footprint in HEAD is already smaller than 4.6 since we got rid of
storing all aliases in a static variable.
I ran a quick profile on a 4.6 site (with no aliases) and it seems the next
place to focus on would be drupal_load() in terms on memory usage.
And here's how time is spent inside that function:
I don't know if this is the best way to profile memory usage, but it seems to
give us the information we're after.
 Xdebug: This site is slower than molasses. - http://xdebug.org/
 KCachegrind - http://kcachegrind.sourceforge.net/cgi-bin/show.cgi/
 WinCacheGrind - http://dev.gauldong.net/mambo/content/view/25/52/
More information about the drupal-devel