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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Jonata Weber
November 25, 2016
Technology
75
0
Share
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
120
PHP Moderno
jonataa
0
120
TemDendê: Desenvolvimento PHP a Moda Baiana
jonataa
0
61
Programação Reativa com RxJS
jonataa
0
150
O que esperar de um profissional de TI
jonataa
0
47
A onda agora é função como serviço
jonataa
0
39
Programação Funcional com Acarajé e Dendê
jonataa
0
70
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
価格.comをAI駆動で全面刷新する ー 30年分の技術的負債を返し、次の30年の土台をつくる ー
tkyowa
10
9.6k
コードレビューを制するチームがソフトウェアデリバリーのフローを制す / Beyond Code Review: Distributing Its Responsibilities Across the SDLC
mtx2s
3
630
ChatworkとBPaaS 異なる特性で学んだAI機能開発の ベストプラクティス
kubell_hr
2
1.7k
Unlocking the Apps
pimterry
0
170
AI Engineering Summit Tokyo 2026 AIの前に、やることがある 〜医療データ企業の4フェーズ〜
dtaniwaki
0
800
Claude Codeですべての日常業務を爆速化しよう!
minorun365
PRO
17
16k
サイバーセキュリティ概論 / Introduction to Cybersecurity
ks91
PRO
0
120
Agentic ERPをどう設計するか ー 受発注エージェントを動かす、現場の知見と設計思想ー
recerqainc
1
480
AI活用を推進するために ファインディが下した、一つの小さな決断
starfish719
0
170
20260528_生成AIを専属DSに_Howの次にすべきことを考える
doradora09
PRO
0
280
OpenID Connectによるサービス間連携
takesection
0
150
実装は速くなった、レビューはどうする? ― 自身のレビューをAIで再現させるサーヴァントエンジニアリングのすゝめ / Implementation got faster. So what about reviews? — An invitation to Servant Engineering: Recreating your own code reviews with AI
nrslib
3
1.9k
Featured
See All Featured
Navigating Weather and Climate Data
rabernat
0
210
Docker and Python
trallard
47
3.9k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.2k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
The browser strikes back
jonoalderson
0
1.1k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
220
Scaling GitHub
holman
464
140k
Automating Front-end Workflow
addyosmani
1370
210k
The Language of Interfaces
destraynor
162
26k
Why Our Code Smells
bkeepers
PRO
340
58k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
370
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
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