Practical Performance Profiling

Andrey “Rarst” Savchenko, WordCamp Norway 2015

Practical Performance Profiling

Andrey “Rarst” Savchenko



interface interactivity boundary

goal 1

10ms resolution

Internet is lying to you

  1. Enable profiler extension…
  2. Load the page to profile…
  3. Find the resulting profile file…
  4. Launch the profile viewer application…
  5. Load the profile file in viewer application…


goal 2

0..2 clicks

Low setup, low detail

var_dump() of profiling

	'%d queries in %.3f seconds, using %.2fMB memory',
	timer_stop( 0, 3 ),
	memory_get_peak_usage() / 1024 / 1024
// 3 queries in 0.251 seconds, using 4.42MB memory

Symfony Stopwatch

$stopwatch = new Stopwatch();
$stopwatch->start( 'eventName' );
// some code goes here
$event = $stopwatch->stop( 'eventName' );
echo $event->getDuration(); // 202
echo $event->getmemory(); // 3670016
Laps interface


High setup, high detail

XHProf / uprofiler

Blackfire Blackfire logo
uProfiler in action

Practical performance profiling

Complete in–browser workflow.

Hands off, always on

New Relic New Relic logo

WP Performance Profiler

next monday

install Laps

a while later

question results

Thank you for listening! Questions?