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
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
82
All aboard the Service Bus @ ZGPHP
robertbasic
0
410
All aboard the Service Bus
robertbasic
1
330
Build your career one contribution at a time
robertbasic
0
160
Profilisanje koda sa Xdebug i KCachegrind
robertbasic
1
220
Mockery
robertbasic
4
840
Zend Framework 2
robertbasic
4
350
Introduction to Zend Framework 1
robertbasic
2
290
Other Decks in Programming
See All in Programming
PyO3 で既存 Python 評価器を Rust core 化する ー wasm-bindgen でブラウザにも配るための設計
kdash
1
280
【DroidKaigi 2026】「アクセシビリティを利用するとき、 アクセシビリティもまたこちらを利用している」 〜マルウェアによる攻撃と防衛について〜
halunoyo
0
250
源内ハンズオン概要編
hideg
0
240
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
250
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
4.2k
20260828_品質と開発生産性を両立させる、AI時代のE2Eテストの考え方
magicpod
0
100
コンパウンドプロダクト開発のためのローカルプロセスマネージャー再発明 #layerxgo
izumin5210
0
620
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
490
GKE アップグレード前に知っておきたい Blue/Green と PDB の関係
stkk
0
130
思考垂れ流し開発 ~音声入力 × AIエージェント × 開発ハーネスによる試行錯誤~
npostring
0
770
DynamoDBの基礎を振り返りながらベクトル検索機能を理解する
musan
3
260
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
0
130
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
9
990
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Abbi's Birthday
coloredviolet
3
9.7k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
What does AI have to do with Human Rights?
axbom
PRO
1
2.3k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
510
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
370
Unsuck your backbone
ammeep
672
58k
Scaling GitHub
holman
464
140k
How to Talk to Developers About Accessibility
jct
2
530
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
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?