$30 off During Our Annual Pro Sale. View Details »
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
170
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
55
All aboard the Service Bus @ ZGPHP
robertbasic
0
370
All aboard the Service Bus
robertbasic
1
300
Build your career one contribution at a time
robertbasic
0
130
Profilisanje koda sa Xdebug i KCachegrind
robertbasic
1
190
Mockery
robertbasic
1
730
Zend Framework 2
robertbasic
4
330
Introduction to Zend Framework 1
robertbasic
2
250
Other Decks in Programming
See All in Programming
ZOZOにおけるAI活用の現在 ~モバイルアプリ開発でのAI活用状況と事例~
zozotech
PRO
8
5.5k
リリース時」テストから「デイリー実行」へ!開発マネージャが取り組んだ、レガシー自動テストのモダン化戦略
goataka
0
120
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
220
AIコーディングエージェント(Manus)
kondai24
0
160
エディターってAIで操作できるんだぜ
kis9a
0
700
全員アーキテクトで挑む、 巨大で高密度なドメインの紐解き方
agatan
8
20k
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
yasunacoffee
0
120
dotfiles 式年遷宮 令和最新版
masawada
1
740
ソフトウェア設計の課題・原則・実践技法
masuda220
PRO
26
22k
Go コードベースの構成と AI コンテキスト定義
andpad
0
120
配送計画の均等化機能を提供する取り組みについて(⽩⾦鉱業 Meetup Vol.21@六本⽊(数理最適化編))
izu_nori
0
140
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
120
Featured
See All Featured
Building Adaptive Systems
keathley
44
2.9k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Music & Morning Musume
bryan
46
7k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Agile that works and the tools we love
rasmusluckow
331
21k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Optimizing for Happiness
mojombo
379
70k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Designing for humans not robots
tammielis
254
26k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
1
93
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?