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
210
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.8k
Build your career one contribution at a time
robertbasic
1
75
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
160
Profilisanje koda sa Xdebug i KCachegrind
robertbasic
1
220
Mockery
robertbasic
3
820
Zend Framework 2
robertbasic
4
350
Introduction to Zend Framework 1
robertbasic
2
280
Other Decks in Programming
See All in Programming
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
930
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
280
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
4
1.6k
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
250
LaravelLive Japan の裏方のすべて — 第188回 PHP勉強会@東京 (2026-06-24)
suguruooki
2
140
Oxlintのカスタムルールの現況
syumai
6
1.2k
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1.1k
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
260
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
180
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
360k
TAKTでAI駆動開発の品質を設計する
j5ik2o
7
1.6k
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
420
Featured
See All Featured
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
230
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
230
How to train your dragon (web standard)
notwaldorf
97
6.7k
Tell your own story through comics
letsgokoyo
1
980
Building AI with AI
inesmontani
PRO
1
1.1k
Odyssey Design
rkendrick25
PRO
2
710
The Curious Case for Waylosing
cassininazir
1
420
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
72
40k
Claude Code のすすめ
schroneko
67
230k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
870
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
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?