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
63
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
750
Zend Framework 2
robertbasic
4
330
Introduction to Zend Framework 1
robertbasic
2
260
Other Decks in Programming
See All in Programming
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
170
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
440
Kotlin Multiplatform Meetup - Compose Multiplatform 외부 의존성 아키텍처 설계부터 운영까지
wisemuji
0
190
AgentCoreとHuman in the Loop
har1101
5
220
Fragmented Architectures
denyspoltorak
0
150
CSC307 Lecture 09
javiergs
PRO
1
830
Apache Iceberg V3 and migration to V3
tomtanaka
0
150
CSC307 Lecture 05
javiergs
PRO
0
490
CSC307 Lecture 03
javiergs
PRO
1
490
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
970
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
590
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.5k
Featured
See All Featured
Between Models and Reality
mayunak
1
180
Information Architects: The Missing Link in Design Systems
soysaucechin
0
770
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
61
52k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
AI: The stuff that nobody shows you
jnunemaker
PRO
2
240
Bash Introduction
62gerente
615
210k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.7k
30 Presentation Tips
portentint
PRO
1
210
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
320
Product Roadmaps are Hard
iamctodd
PRO
55
12k
HDC tutorial
michielstock
1
360
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?