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
AtCoder Conference 2025
shindannin
0
1k
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
今から始めるClaude Code超入門
448jp
8
8.6k
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
2026年 エンジニアリング自己学習法
yumechi
0
130
CSC307 Lecture 02
javiergs
PRO
1
770
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
260
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
420
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.5k
AgentCoreとHuman in the Loop
har1101
5
230
AWS re:Invent 2025参加 直前 Seattle-Tacoma Airport(SEA)におけるハードウェア紛失インシデントLT
tetutetu214
2
110
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
400
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
37
3.6k
How to Ace a Technical Interview
jacobian
281
24k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
640
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
820
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
270
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
300
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Rails Girls Zürich Keynote
gr2m
96
14k
A better future with KSS
kneath
240
18k
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?