Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Code profiling with Xdebug and Kcachegrind
Search
robertbasic
January 28, 2017
Programming
0
170
Code profiling with Xdebug and Kcachegrind
Slides for an uncon talk I gave at phpbnl17
robertbasic
January 28, 2017
Tweet
Share
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
56
All aboard the Service Bus @ ZGPHP
robertbasic
0
370
All aboard the Service Bus
robertbasic
1
300
Build your career one contribution at a time
robertbasic
0
140
Profilisanje koda sa Xdebug i KCachegrind
robertbasic
1
190
Mockery
robertbasic
1
730
Zend Framework 2
robertbasic
4
330
Introduction to Zend Framework 1
robertbasic
2
250
Other Decks in Programming
See All in Programming
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
130
ゲームの物理 剛体編
fadis
0
350
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
460
Rediscover the Console - SymfonyCon Amsterdam 2025
chalasr
2
160
テストやOSS開発に役立つSetup PHP Action
matsuo_atsushi
0
150
ZOZOにおけるAI活用の現在 ~モバイルアプリ開発でのAI活用状況と事例~
zozotech
PRO
8
5.7k
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
6
3.5k
これだけで丸わかり!LangChain v1.0 アップデートまとめ
os1ma
6
1.8k
AIコーディングエージェント(Manus)
kondai24
0
180
WebRTC と Rust と8K 60fps
tnoho
2
2k
AIコーディングエージェント(Gemini)
kondai24
0
220
Microservices rules: What good looks like
cer
PRO
0
1.4k
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Mobile First: as difficult as doing things right
swwweet
225
10k
Unsuck your backbone
ammeep
671
58k
[SF Ruby Conf 2025] Rails X
palkan
0
520
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
How to train your dragon (web standard)
notwaldorf
97
6.4k
Done Done
chrislema
186
16k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Visualization
eitanlees
150
16k
YesSQL, Process and Tooling at Scale
rocio
174
15k
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?