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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
robertbasic
January 28, 2017
Programming
0
180
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
66
All aboard the Service Bus @ ZGPHP
robertbasic
0
380
All aboard the Service Bus
robertbasic
1
310
Build your career one contribution at a time
robertbasic
0
140
Profilisanje koda sa Xdebug i KCachegrind
robertbasic
1
200
Mockery
robertbasic
1
760
Zend Framework 2
robertbasic
4
340
Introduction to Zend Framework 1
robertbasic
2
270
Other Decks in Programming
See All in Programming
15年目のiOSアプリを1から作り直す技術
teakun
0
560
「ブロックテーマでは再現できない」は本当か?
inc2734
0
1.1k
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
6
1.6k
Claude Code、ちょっとした工夫で開発体験が変わる
tigertora7571
0
190
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
120
ぼくの開発環境2026
yuzneri
1
290
20260228_JAWS_Beginner_Kansai
takuyay0ne
4
340
株式会社 Sun terras カンパニーデック
sunterras
0
1.9k
AIコーディングの理想と現実 2026 | AI Coding: Expectations vs. Reality 2026
tomohisa
0
730
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
2k
Beyond the Basics: Signal Forms
manfredsteyer
PRO
0
100
DevinとClaude Code、SREの現場で使い倒してみた件
karia
0
470
Featured
See All Featured
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
67
37k
Rails Girls Zürich Keynote
gr2m
96
14k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
210
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
69
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
400
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
190
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
140
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.2k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
130
Visualization
eitanlees
150
17k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
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?