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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
robertbasic
January 28, 2017
Programming
200
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
74
All aboard the Service Bus @ ZGPHP
robertbasic
0
400
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
2
810
Zend Framework 2
robertbasic
4
350
Introduction to Zend Framework 1
robertbasic
2
270
Other Decks in Programming
See All in Programming
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
140
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
120
The NotImplementedError Problem in Ruby
koic
1
670
スマートグラスで並列バイブコーディング
hyshu
0
120
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
380
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
280
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
150
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
530
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
160
Contextとはなにか
chiroruxx
0
270
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
3.5k
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.3k
Featured
See All Featured
Skip the Path - Find Your Career Trail
mkilby
1
140
BBQ
matthewcrist
89
10k
Facilitating Awesome Meetings
lara
57
7k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
170
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
Thoughts on Productivity
jonyablonski
76
5.2k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
How to Ace a Technical Interview
jacobian
281
24k
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
The Invisible Side of Design
smashingmag
302
52k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
Making the Leap to Tech Lead
cromwellryan
135
9.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?