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
190
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
69
All aboard the Service Bus @ ZGPHP
robertbasic
0
390
All aboard the Service Bus
robertbasic
1
310
Build your career one contribution at a time
robertbasic
0
150
Profilisanje koda sa Xdebug i KCachegrind
robertbasic
1
200
Mockery
robertbasic
1
760
Zend Framework 2
robertbasic
4
340
Introduction to Zend Framework 1
robertbasic
2
270
Other Decks in Programming
See All in Programming
エンジニアの「手元の自動化」を加速するn8n 2026.02.27
symy2co
0
160
CDIの誤解しがちな仕様とその対処TIPS
futokiyo
0
220
Docコメントで始める簡単ガードレール
keisukeikeda
1
130
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
1.8k
How to stabilize UI tests using XCTest
akkeylab
0
130
モックわからないマン卒業記 ~振る舞いを起点に見直した、フロントエンドテストにおけるモックの使いどころ~
tasukuwatanabe
3
400
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
190
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
270
Cyrius ーLinux非依存にコンテナをネイティブ実行する専用OSー
n4mlz
0
220
AI活用のコスパを最大化する方法
ochtum
0
220
エラーログのマスキングの仕組みづくりに役立ったASTの話
kumoichi
0
250
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
4
1.4k
Featured
See All Featured
Paper Plane
katiecoart
PRO
0
48k
sira's awesome portfolio website redesign presentation
elsirapls
0
190
Crafting Experiences
bethany
1
89
Automating Front-end Workflow
addyosmani
1370
200k
ラッコキーワード サービス紹介資料
rakko
1
2.7M
Statistics for Hackers
jakevdp
799
230k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
110
Building a Scalable Design System with Sketch
lauravandoore
463
34k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
410
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
230
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
1.9k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.4k
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?