Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Code profiling with Xdebug and Kcachegrind
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
robertbasic
January 28, 2017
Programming
200
0
Share
Code profiling with Xdebug and Kcachegrind
Slides for an uncon talk I gave at phpbnl17
robertbasic
January 28, 2017
More Decks by robertbasic
See All by robertbasic
All aboard the Service Bus!
robertbasic
1
1.7k
Build your career one contribution at a time
robertbasic
1
73
All aboard the Service Bus @ ZGPHP
robertbasic
0
390
All aboard the Service Bus
robertbasic
1
320
Build your career one contribution at a time
robertbasic
0
150
Profilisanje koda sa Xdebug i KCachegrind
robertbasic
1
210
Mockery
robertbasic
1
790
Zend Framework 2
robertbasic
4
340
Introduction to Zend Framework 1
robertbasic
2
270
Other Decks in Programming
See All in Programming
🦞OpenClaw works with AWS
licux
1
330
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
120
Back to the roots of date
jinroq
0
680
サプライチェーン攻撃対策「層を重ねて落ちない壁」を10日間で組み上げた話 #TechLeadConf2026
kashewnuts
1
180
The Less-Told Story of Socket Timeouts
coe401_
3
950
なぜあなたのコードには「コシ」がないのか?〜AI時代に問う、最後まで美味しい設計と戦略〜 #phpconkagawa / phpconkagawa2026
shogogg
0
130
2026-04-15 Spring IO - I Can See Clearly Now
jonatan_ivanov
1
170
Making the RBS Parser Faster
soutaro
0
660
when storing skills in S3 file
watany
3
1.1k
Kingdom of the Machine
yui_knk
2
1.4k
実用!Hono RPC2026
yodaka
2
300
Building on Bluesky's AT Protocol with Ruby
mackuba
0
100
Featured
See All Featured
Darren the Foodie - Storyboard
khoart
PRO
3
3.3k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Navigating Weather and Climate Data
rabernat
0
180
Are puppies a ranking factor?
jonoalderson
1
3.4k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
From π to Pie charts
rasagy
0
180
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
240
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
190
Ethics towards AI in product and experience design
skipperchong
2
270
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
Transcript
Robert Basic ~ phpbenelux17 Code profiling with Xdebug and KCachegrind
Robert Basic https://robertbasic.com/ @robertbasic
Robert Basic ~ phpbenelux17 Tools of the trade Xdebug •
Not just for debugging KCachegrind • Visualizing profiling data
Robert Basic ~ phpbenelux17 What’s the fastest code?
Robert Basic ~ phpbenelux17 The code that’s not called!
Robert Basic ~ phpbenelux17 Number of calls
Robert Basic ~ phpbenelux17 Who’s to blame?
Robert Basic ~ phpbenelux17 Which was called by another method
Robert Basic ~ phpbenelux17 Which was called by another method
Robert Basic ~ phpbenelux17 So many callers!
Robert Basic ~ phpbenelux17 A graph to see it
Robert Basic ~ phpbenelux17 Context to understand it
Robert Basic ~ phpbenelux17 Fix it This is really up
to you
Robert Basic ~ phpbenelux17 Tips for fixing performance issues •
Biggest impact, least effort • Profile after every change • Avoid over-optimizing • Learn to EXPLAIN
Robert Basic ~ phpbenelux17 Tips for using Xdebug and KCachegrind
• Xdebug – xdebug.profiler_output_dir – xdebug.profiler_output_name – cachegrind.out.%t.%R – Xdebug lies! • KCachegrind – Install graphviz – Use % relative – Turn on Cycle detection – Settings > Configure KCachegrind > Annotations > Add source folder
Robert Basic ~ phpbenelux17 Other tools • WinCacheGrind, Webgrind •
XHProf • Blackfire.io
Robert Basic ~ phpbenelux17 Thanks! Questions?