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
Medindo a Performance de Códigos PHP
Search
Jonata Weber
November 25, 2016
Technology
79
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Medindo a Performance de Códigos PHP
Jonata Weber
November 25, 2016
More Decks by Jonata Weber
See All by Jonata Weber
PHPStan - Analisador Estático
jonataa
0
130
PHP Moderno
jonataa
0
120
TemDendê: Desenvolvimento PHP a Moda Baiana
jonataa
0
64
Programação Reativa com RxJS
jonataa
0
150
O que esperar de um profissional de TI
jonataa
0
56
A onda agora é função como serviço
jonataa
0
42
Programação Funcional com Acarajé e Dendê
jonataa
0
82
Curso de Programação Funcional com JavaScript
jonataa
0
190
5 motivos para você participar de eventos
jonataa
0
160
Other Decks in Technology
See All in Technology
M5Stackで作る BLEマウス GPSログの世界
tomokusaba
0
410
Post AI時代のリファクタリング実践記 / Refactoring in the post AI era
kaminashi
1
230
Rustuna: Rustによる高速なOptuna実装
pfn
PRO
0
190
今さら理解するウェブフォントver.2026
takanorip
3
730
[JAWS-UG彩の国埼玉#12]そろそろ準備する?re:Invent2026をやさしく解説 / reinvent2026-sainokuni
sh_fk2
1
320
Metadata - Section 1: HTML Basics
mohab1
0
110
日本語に強いオープンな大規模言語モデル「LLM-jp」
odashi
4
1.1k
大型犬好きによるPugの紹介
yamanoku
1
150
Browser Spec: Testing Hotwire with Ruby
takahashim
1
120
遠藤な_めぐろLT #38 「社内のAI活用推進」@麻布台_20261009
endonanana
0
130
オントロジーって 結局なにもの? AI エージェントに「意味」を渡す知識設計の話
greenmidori
0
150
『SAR衛星データ解析入門』のご紹介とその応用
syuchimu
0
120
Featured
See All Featured
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
570
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
280
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Color Theory Basics | Prateek | Gurzu
gurzu
1
490
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
570
We Are The Robots
honzajavorek
0
400
Statistics for Hackers
jakevdp
799
230k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
300
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.2k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
440
Tell your own story through comics
letsgokoyo
1
1.1k
Transcript
Medindo a Performance de Códigos PHP Por Jonata Weber
@JonataWeber
www.app2sales.com
None
Performance Computer performance is the amount of work accomplished by
a computer system.
Aspects of performance • Availability • Response Time • Processing
Speed • Latency • Bandwidth • Throughtput • Scalability
Pick any two Cheap Good Fast
Development vs Production
Tools
Faker
Profile Before Optimizing
$then = microtime(); myFunc(); $now = microtime(); echo sprintf("Elapsed: %f",
$now - $then); There's a better way, right? :)
Apache Benchmarking $ ab -n 100 -c 10 http://localhost:8000
HTTP Benchmarking $ wrk -t12 -c400 -d30s http://localhost:8000
Testing High Availability
Load testing tool
None
Profiling
None
Install the xdebug $ pecl install xdebug
Starting the Profiler (php.ini) xdebug.profiler_enable=1 xdebug.profiler_output_dir xdebug.profiler_enable_trigger=1 More informations: https://xdebug.org/docs/profiler
Profiler Viewer
Profiler Viewer (in the browser)
Flame Graphs
XHProf: A Hierarchical Profiler for PHP
None
None
None
None
Demo
Problemas comuns
Problemas comuns • Arquitetura • Workload
Arquitetura • Sem cache; • Hardware mal dimensionado; • Aplicação
single thread; • Latência de rede não prevista.
Workload • Mais usuários que o esperado; • Cache mal
planejado.
Otimização precoce, fazer ou não fazer, eis a questão.
YAGNI You Aren't Gonna Need It
Mas, as vezes é preciso!
Make work. Make right. Make fast.
O que não pode ser medido não pode ser melhorado.
Esteja pronto, sempre!
None
Obrigado! @JonataWeber
Referências https://speakerdeck.com/tarsisazevedo/performance-analysis-101 http://wiki.c2.com/?PrematureOptimization http://wiki.c2.com/?ProfileBeforeOptimizing http://wiki.c2.com/?MakeItWorkMakeItRightMakeItFast