Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Code profiling with Xdebug and Kcachegrind
Search
robertbasic
January 28, 2017
Programming
230
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
92
All aboard the Service Bus @ ZGPHP
robertbasic
0
430
All aboard the Service Bus
robertbasic
1
340
Build your career one contribution at a time
robertbasic
0
170
Profilisanje koda sa Xdebug i KCachegrind
robertbasic
1
240
Mockery
robertbasic
4
870
Zend Framework 2
robertbasic
4
360
Introduction to Zend Framework 1
robertbasic
2
300
Other Decks in Programming
See All in Programming
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
240
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
5
790
Event is what happens
moro
2
3.8k
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
920
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
210
Railsバージョンを4倍にした話
optim
0
960
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
2
290
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
2.2k
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
360
AI Augmentation Techniques with Liberty
ivargrimstad
1
390
Kotlinize Is Not Just Converting to Kotlin
chigichan24
1
220
ChromeでローカルLLM
ryu1013
0
200
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
96
14k
My Coaching Mixtape
mlcsv
0
380
Designing for Timeless Needs
cassininazir
1
550
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
310
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
60k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
590
Making the Leap to Tech Lead
cromwellryan
135
10k
GitHub's CSS Performance
jonrohan
1033
470k
The Cult of Friendly URLs
andyhume
79
7.1k
Product Roadmaps are Hard
iamctodd
55
13k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
300
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?