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
Web Performance: Não deixe o usuário desistir d...
Search
Amanda Vilela
December 14, 2019
Programming
1
190
Web Performance: Não deixe o usuário desistir do seu site
Talk apresentada no JS Day Recife 2019
Amanda Vilela
December 14, 2019
Tweet
Share
More Decks by Amanda Vilela
See All by Amanda Vilela
Construindo sua primeira página web: Sua porta de entrada para uma carreira de front-end
amandavilela
1
91
Como tornamos os sorteios da BrazilJS on the Road Sorocaba mais divertidos utilizando JS
amandavilela
0
68
Sobre Carreira e Comunidades
amandavilela
0
42
PWA beyond theory - How to create your progressive web app
amandavilela
0
71
Crie seu Próprio Plano de Carreira
amandavilela
0
59
Como otimizar a performance da sua aplicação JS
amandavilela
0
100
Você nem sempre precisa de um framework JS
amandavilela
0
84
Que tal usar CSS em vez de JS?
amandavilela
1
110
Front-end: o que é, mercado e como começar
amandavilela
1
90
Other Decks in Programming
See All in Programming
Functional Calisthenics in Kotlin: Kotlinで「関数型エクササイズ」を実践しよう
lagenorhynque
0
130
PHPライセンス変更の議論を通じて学ぶOSSライセンスの基礎
matsuo_atsushi
0
140
Honoを技術選定したAI要件定義プラットフォームAcsimでの意思決定
codenote
0
160
Rails Girls Sapporo 2ndの裏側―準備の日々から見えた、私が得たもの / SAPPORO ENGINEER BASE #11
lemonade_37
2
130
PyCon mini 東海 2025「個人ではじめるマルチAIエージェント入門 〜LangChain × LangGraphでアイデアを形にするステップ〜」
komofr
3
950
JEP 496 と JEP 497 から学ぶ耐量子計算機暗号入門 / Learning Post-Quantum Crypto Basics from JEP 496 & 497
mackey0225
2
220
レイトレZ世代に捧ぐ、今からレイトレを始めるための小径
ichi_raven
0
300
What’s Fair is FAIR: A Decentralised Future for WordPress Distribution
rmccue
0
170
AIエージェントでのJava開発がはかどるMCPをAIを使って開発してみた / java mcp for jjug
kishida
4
540
Tangible Code
chobishiba
3
530
AI駆動開発カンファレンスAutumn2025 _AI駆動開発にはAI駆動品質保証
autifyhq
0
160
ボトムアップの生成AI活用を推進する社内AIエージェント開発
aku11i
0
1.6k
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
Automating Front-end Workflow
addyosmani
1371
200k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.2k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
658
61k
Code Review Best Practice
trishagee
72
19k
Music & Morning Musume
bryan
46
6.9k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
11
930
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
192
56k
Typedesign – Prime Four
hannesfritz
42
2.9k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Transcript
Web Performance Não deixe o usuário desistir do seu site
Amanda Vilela Desenvolvedora front-end, freelancer na Toptal, organizadora de algumas
comunidades de Sorocaba. • amandavilela.com • @amandavilela___ Oi :) 2
Importância da performance
Usuários não gostam de coisas lentas
Como melhorar a performance?
None
None
First Contentful Paint (FCP)
Time To Interactive (TTI)
None
Carregar o mínimo e mostrar algo relevante para o usuário
1. Remova o que não tem importância
None
Minifique o código
None
- 12,4 KB
• Minifier: An online tool minifies JavaScript or CSS via
copy and paste. • Grunt: An NPM minification package that integrates into the Grunt workflow. • Gulp: An NPM minification package that integrates into the Gulp workflow. • Frameworks: Separe o modo desenvolvimento de produção
Revise a necessidade de certas libs
None
None
None
Só envie o código que o usuário precisa
None
None
None
- 7,5 KB
None
None
- 43,3 KB
None
None
None
Remova imagens desnecessárias
None
Otimize as imagens que restarem
None
None
None
None
• SVG no que for possível, mas não esqueça de
otimizar também: svgomg • Substitua GIFs por vídeos: WebM e MP4, ffmpeg
Não redimensione imagens no HTML nem no CSS
Imagens responsivas
Antes: Depois:
2. Use Lazy Load
First-View e o Above the Fold
None
None
None
Cuidado com o reflow!
None
None
None
None
3. Evite carregar a fonte no CSS
None
None
None
Self host para melhor performance
None
4. Reduza a quantidade de requests
None
CSS Inline
sim, CSS Inline
Above the Fold
None
None
- 44,1 KB Antes: Depois:
Cuidado com o tamanho do DOM!
5. Ative o GZip
None
6. Reduza os scripts bloqueantes
Uma tag <script> que: • Está no <head> do documento;
• Não tem um atributo defer; • Não tem um atributo async;
Carregamento assíncrono de CSS
None
7. Lazy load no JS
None
None
None
None
Comparação
8. Adapte com base na qualidade da rede
None
None
None
None
9. Faça cache dos recursos estáticos
HTTP cache headers
None
Service Worker
None
None
10. Código transpilado e mais bytes
None
None
11. Use HTTP2
Monitorando Métricas
None
None
None
None
None
None
Performance Budgets
budget.json
None
None
None
Lighthouse Bot
None
Referências • https://www.awwwards.com/brain-food-perceived-performance • https://developers.google.com/web/fundamentals/performance/why-performance-matters • https://developers.google.com/web/tools/chrome-devtools/coverage • https://developers.google.com/web/tools/chrome-devtools/evaluate-performance •
https://web.dev/fast/ • https://www.filamentgroup.com/lab/inlining-cache.html • https://web.dev/using-lighthouse-bot-to-set-a-performance-budget/
Slides: speakerdeck.com/amandavilela
Pull Request em: https://github.com/JSdayBR/recife
http://bit.ly/toptal-amanda
Obrigada!