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
190
0
Share
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.7k
Build your career one contribution at a time
robertbasic
1
71
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
210
Mockery
robertbasic
1
780
Zend Framework 2
robertbasic
4
340
Introduction to Zend Framework 1
robertbasic
2
270
Other Decks in Programming
See All in Programming
瑠璃の宝石に学ぶ技術の声の聴き方 / 【劇場版】アニメから得た学びを発表会2026 #エンジニアニメ
mazrean
0
240
Running Swift without an OS
kishikawakatsumi
0
820
Feature Toggle は捨てやすく使おう
gennei
0
590
Swift Concurrency Type System
inamiy
0
500
Going Multiplatform with Your Android App (Android Makers 2026)
zsmb
2
410
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
1
100
PCOVから学ぶコードカバレッジ #phpcon_odawara
o0h
PRO
0
260
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
1
140
Vibe하게 만드는 Flutter GenUI App With ADK , 박제창, BWAI Incheon 2026
itsmedreamwalker
0
550
Nuxt Server Components
wattanx
0
270
CursorとClaudeCodeとCodexとOpenCodeを実際に比較してみた
terisuke
1
450
ハンズオンで学ぶクラウドネイティブ
tatsukiminami
0
130
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.8k
RailsConf 2023
tenderlove
30
1.4k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Mobile First: as difficult as doing things right
swwweet
225
10k
Between Models and Reality
mayunak
3
260
Done Done
chrislema
186
16k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
790
Ruling the World: When Life Gets Gamed
codingconduct
0
200
Accessibility Awareness
sabderemane
0
100
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
130
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
370
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
510
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?