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
Transcript
16 slides
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?
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
94
All aboard the Service Bus @ ZGPHP
robertbasic
0
430
All aboard the Service Bus
robertbasic
1
350
Build your career one contribution at a time
robertbasic
0
170
Profilisanje koda sa Xdebug i KCachegrind
robertbasic
1
240
Mockery
robertbasic
4
880
Zend Framework 2
robertbasic
4
360
Introduction to Zend Framework 1
robertbasic
2
300
Other Decks in Programming
See All in Programming
Lean で手続き的プログラム の証明が書けるようになった
inoueasei
11
6.1k
はじめてのPLATEAU
nokonoko1203
1
680
Stage 3でも仕様は変わる。アプリケーション開発者のためのTC39プロセスの読み方
bicstone
2
1.3k
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
3
360
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
2
530
SODA - FACT BOOK(EN)
sodainc
1
310
あなたはMCPの機能を、まだ知らない。
4geru
1
760
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
240
Apache Airflow Introduction
leew
1
100
protojson における文字化けの扱い
kazuki1023
0
470
SODA - FACT BOOK(JP)
sodainc
1
40k
観測者から当事者へ、AI 時代にドメインへ深入りする知識と技術 / From Observer to Practitioner: Going Deep into Domains in the Age of AI
nrslib
2
190
Featured
See All Featured
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.9k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
2
4.1k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.5k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Deep Space Network (abreviated)
tonyrice
0
440
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
590
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.6k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.2k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
680
How STYLIGHT went responsive
nonsquared
100
6.4k