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
Medindo a Performance de Códigos PHP
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Jonata Weber
November 25, 2016
Technology
0
74
Medindo a Performance de Códigos PHP
Jonata Weber
November 25, 2016
Tweet
Share
More Decks by Jonata Weber
See All by Jonata Weber
PHPStan - Analisador Estático
jonataa
0
120
PHP Moderno
jonataa
0
110
TemDendê: Desenvolvimento PHP a Moda Baiana
jonataa
0
58
Programação Reativa com RxJS
jonataa
0
140
O que esperar de um profissional de TI
jonataa
0
43
A onda agora é função como serviço
jonataa
0
35
Programação Funcional com Acarajé e Dendê
jonataa
0
60
Curso de Programação Funcional com JavaScript
jonataa
0
180
5 motivos para você participar de eventos
jonataa
0
160
Other Decks in Technology
See All in Technology
私がよく使うMCPサーバー3選と社内で安全に活用する方法
kintotechdev
0
110
Amazon Qはアマコネで頑張っています〜 Amazon Q in Connectについて〜
yama3133
1
130
Bref でサービスを運用している話
sgash708
0
200
イベントで大活躍する電子ペーパー名札を作る(その2) 〜 M5PaperとM5PaperS3 〜 / IoTLT @ JLCPCB オープンハードカンファレンス
you
PRO
0
210
データマネジメント戦略Night - 4社のリアルを語る会
ktatsuya
1
280
20260323_データ分析基盤でGeminiを使う話
1210yuichi0
0
180
ADK + Gemini Enterprise で 外部 API 連携エージェント作るなら OAuth の仕組みを理解しておこう
kaz1437
0
200
BFCacheを活用して無限スクロールのUX を改善した話
apple_yagi
0
130
TUNA Camp 2026 京都Stage ヒューリスティックアルゴリズム入門
terryu16
0
520
Embeddings : Symfony AI en pratique
lyrixx
0
310
AIエージェント勉強会第3回 エージェンティックAIの時代がやってきた
ymiya55
0
130
SSoT(Single Source of Truth)で「壊して再生」する設計
kawauso
2
360
Featured
See All Featured
Bash Introduction
62gerente
615
210k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
200
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.5k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
410
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
The agentic SEO stack - context over prompts
schlessera
0
720
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
150
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
300
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
220
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