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
robertbasic
January 28, 2017
Programming
0
180
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
63
All aboard the Service Bus @ ZGPHP
robertbasic
0
380
All aboard the Service Bus
robertbasic
1
310
Build your career one contribution at a time
robertbasic
0
140
Profilisanje koda sa Xdebug i KCachegrind
robertbasic
1
200
Mockery
robertbasic
1
750
Zend Framework 2
robertbasic
4
330
Introduction to Zend Framework 1
robertbasic
2
260
Other Decks in Programming
See All in Programming
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.3k
CSC307 Lecture 09
javiergs
PRO
1
830
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
20
6.8k
MUSUBIXとは
nahisaho
0
130
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
380
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
990
CSC307 Lecture 04
javiergs
PRO
0
660
Basic Architectures
denyspoltorak
0
660
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
今から始めるClaude Code超入門
448jp
7
8.4k
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
100
6k
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
63
The Cult of Friendly URLs
andyhume
79
6.8k
Deep Space Network (abreviated)
tonyrice
0
45
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
270
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.8k
Testing 201, or: Great Expectations
jmmastey
46
8k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
3.9k
The Curse of the Amulet
leimatthew05
1
8.2k
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?