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
150
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.6k
Build your career one contribution at a time
robertbasic
1
48
All aboard the Service Bus @ ZGPHP
robertbasic
0
310
All aboard the Service Bus
robertbasic
1
280
Build your career one contribution at a time
robertbasic
0
120
Profilisanje koda sa Xdebug i KCachegrind
robertbasic
1
170
Mockery
robertbasic
1
650
Zend Framework 2
robertbasic
4
310
Introduction to Zend Framework 1
robertbasic
2
220
Other Decks in Programming
See All in Programming
AI Coding Agent Enablement in TypeScript
yukukotani
17
6.7k
鯛変だったRubyKaigi 2025 ── それでも楽しかった!
pndcat
0
130
コンポーネントライブラリで実現する、アクセシビリティの正しい実装パターン
schktjm
1
620
JSAI2025 RecSysChallenge2024 優勝報告
unonao
1
360
Proxmoxをまとめて管理できるコンソール作ってみました
karugamo
1
390
複雑なフォームを継続的に開発していくための技術選定・設計・実装 #tskaigi / #tskaigi2025
izumin5210
12
6.1k
マテリアルって何者?RealityKitで扱うマテリアル入門
nao_randd
0
140
TypeScript Language Service Plugin で CSS Modules の開発体験を改善する
mizdra
PRO
3
2.2k
AIエージェントによるテストフレームワーク Arbigent
takahirom
0
260
Rethinking Data Access: The New httpResource in Angular
manfredsteyer
PRO
0
210
コードに語らせよう――自己ドキュメント化が内包する楽しさについて / Let the Code Speak
nrslib
5
780
バランスを見極めよう!実装の意味を明示するための型定義 TSKaigi 2025 Day2 (5/24)
whatasoda
2
760
Featured
See All Featured
Side Projects
sachag
454
42k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.3k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
The World Runs on Bad Software
bkeepers
PRO
68
11k
Build The Right Thing And Hit Your Dates
maggiecrowley
35
2.7k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
A Tale of Four Properties
chriscoyier
159
23k
Writing Fast Ruby
sferik
628
61k
Become a Pro
speakerdeck
PRO
28
5.4k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
15
880
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.6k
Designing Experiences People Love
moore
142
24k
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?