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
63
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
サーバーレスをどこまで使う? WebRTC対戦ゲームで選んだVPSとの共存設計
kaidouji85
0
370
AIに任せた品質は、誰が見立てるのか - AI時代のテストマネジメント
nakanao
3
2.9k
AIエージェントの自己改善をどう設計するか / How to Design Self-Improvement for AI Agents
22mi
26
17k
開発投資の期待値を上げるプロダクトロードマップづくり ~プロダクトエンジニアが越境して事業を伸ばす~
kekekenta
1
240
AI Agent入門〜今更聞けないAgentの話〜
hiromimaganuma
0
110
バイブコーディング時代のWebアプリ開発入門~Cloud Runで学ぶセキュアなビルドとデプロイ
waiwai2111
1
150
Kiro Meetup #8 Kiro アップデート (2026/3/21〜2026/9/24)
katzueno
1
160
GoのInterface内部構造から学ぶ!最高パフォーマンスを出すコード設計
yappli_developers
1
270
SREは、MCPとAutopilotをこう使え!
kazumax55
3
950
aws-iot-platform-architecture-use-cases.pdf
ma2shita
0
570
俺の仕事は AIに奪われないし、たぶんその BIも要らない
hikaruri
0
540
AI時代、データエンジニアが一番おもろい
genshun9
0
690
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
410
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
250
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Paper Plane (Part 1)
katiecoart
PRO
2
11k
Practical Orchestrator
shlominoach
192
12k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
2k
Accessibility Awareness
sabderemane
1
220
Testing 201, or: Great Expectations
jmmastey
46
8.3k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
340
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