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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
800
Zend Framework 2
robertbasic
4
350
Introduction to Zend Framework 1
robertbasic
2
270
Other Decks in Programming
See All in Programming
Are We Really Coding 10× Faster with AI?
kohzas
0
220
TypeScriptだけでAIエージェントを作る フロント・エージェント・インフラのフルスタック実践
har1101
6
980
バックエンドにElysiaJSを採用して気付いた、良い点・悪い点
wanko_it
1
170
AIエージェントの隔離技術の徹底比較
kawayu
0
420
横断組織出身のQAEがインプロセスQAEでつまずいたこと・活かせたこと
ty89
0
180
AI時代だからこそ「Bloc」を採用する価値があるのかもしれない
takuroabe
0
230
権限チェックの一貫性を型で守る TypeScript による多層防御
mnch
3
570
Old Dog, New Tricks: The Java 25 Reinvention - JNation
bazlur_rahman
0
120
誰も頼んでない機能を出荷した話
zekutax
0
120
20260514_its_the_context_window_stupid.pdf
heita
0
1.1k
UaaL×Androidアプリのメモリ計測 — Memory Profilerの先へ
rio432
0
170
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
530
Featured
See All Featured
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
920
Utilizing Notion as your number one productivity tool
mfonobong
4
310
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
170
Practical Orchestrator
shlominoach
191
11k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
390
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
420
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
270
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
250
How STYLIGHT went responsive
nonsquared
100
6.1k
Making the Leap to Tech Lead
cromwellryan
135
9.8k
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?