SlideShare a Scribd company logo
Performance Optimization of
Modern Web Apps
Filip Rakowski
Divante / Vue Storefront
Filip Rakowski
Co-founder
Frontend Developer
Community partner
@filrakowski


Let’s talk about Performance!
*but not rendering performance, it’s a huge topic and they gave me only ~30 minutes ;(
@filrakowski
Why performance is important?
@filrakowski
@filrakowski
2.2 sec load time reduction resulted in 15.4%
more downloads
Firefox
@filrakowski
1s slowdown resulted in 11% less page views
Aberdeen Group
@filrakowski
2 sec delay resulted in 4.3% loss in revenue
per visitor and 3.75% reduction in clicks
Bing
@filrakowski
cutting page load time half resulted in 13%
increase in sales
AutoAnything
@filrakowski
SPEED = MONEY
@filrakowski
What influences loading time performance?
@filrakowski
Request /
Response
@filrakowski
Request /
Response
Parsing
@filrakowski
Request /
Response
Parsing Execution
@filrakowski
Request /
Response
Parsing Execution
@filrakowski
Examples are in Vue
Rules are framework agnostic ;)
@filrakowski
Single File
Components


Component.vue
@filrakowski
Let’s make an app!
@filrakowski
main.jsApp.vue Vue
@filrakowski
main.jsrouter.js Vue
Home.vue
About.vueLodash
vue-router app.js
App.vue
@filrakowski
every new module or library
=
bigger bundle
@filrakowski
bigger bundle
=
longer download
@filrakowski
bigger bundle
=
longer parsing
@filrakowski
bigger bundle
=
longer execution
@filrakowski
SPEED = MONEY
@filrakowski
MORE FEATURES = LESS MONEY?
@filrakowski
@filrakowski
How webpack bundling works?
@filrakowski
Dependency graph is a graph of modules in
your application. Starting from entry point
webpack is recursively adding all imported
modules to the graph and bundles them into
(usually) one file.
@filrakowski
main.jsrouter.js Vue
Home.vue
About.vueLodash
vue-router
App.vue
@filrakowski
main.jsrouter.js Vue
Home.vue
About.vueLodash
vue-router
App.vue
@filrakowski
main.jsrouter.js Vue
Home.vue
About.vueLodash
vue-router
App.vue
@filrakowski
main.jsrouter.js Vue
Home.vue
About.vueLodash
vue-router
App.vue
@filrakowski
main.jsrouter.js Vue
Home.vue
About.vueLodash
vue-router
App.vue
@filrakowski
main.jsrouter.js Vue
Home.vue
About.vueLodash
vue-router
App.vue
app.js
@filrakowski
main.jsrouter.js Vue
Home.vue
About.vueLodash
vue-router app.js
App.vue
We might not
need this!
@filrakowski
Code splitting allows you to split your code
into various bundles. You can think about this
as deferring a piece of your dependency
graph to be loaded later.
@filrakowski
Lazy loading loading chunk of code on demand
usually as a response to user action.
@filrakowski
Dynamic import
@filrakowski
@filrakowski
Lazy component in Vue
@filrakowski
Lazy component in React with React.lazy
@filrakowski
Lazy module in Angular with loadChildren
@filrakowski
You’ll be able to
lazily load individual modules
with Angular Ivy Compiler
@filrakowski@filrakowski
main.jsrouter.js Vue
Home.vue
About.vueLodash
vue-router app.js
App.vue
home.js
about.js
@filrakowski
Nuxt is doing per-route code-splitting out of the box!
@filrakowski
Rule #1 - Split your code per route
@filrakowski
What else we don’t need on initial download?
@filrakowski
@filrakowski
@filrakowski
Rule #2 - Load off-screen components lazily
@filrakowski
@filrakowski
You can use v-if to lazily load
off-screen components
What else?
@filrakowski
Rule #3 - Load non-critical libraries lazily
@filrakowski
@filrakowski
Rule #4 - Avoid bundling all 3rd party libs into
one file. It’s an anti-pattern.
@filrakowski
main.jsrouter.js Vue
Home.vue
About.vueLodash
vue-router vendor.js
App.vue
@filrakowski
main.jsrouter.js Vue
Home.vue
About.vueLodash
vue-router vendor.js
App.vue
We might not
need this!
@filrakowski
What about code duplication?
@filrakowski
main.jsrouter.js Vue
Home.vue
About.vueLodash
vue-router app.js
App.vue
home.js
about.js
Lodash
@filrakowski
main.jsrouter.js Vue
Home.vue
About.vueLodash
vue-router app.js
App.vue
home.js
about.js
Lodash
@filrakowski
@filrakowski
Rule #5 - Choose your libraries carefully and
try to find smaller equivalents if possible
@filrakowski
@filrakowski
@filrakowski
@filrakowski
Request /
Response
Parsing Execution
@filrakowski
Rule #5 - Make use of cache for static assets
@filrakowski
Service workers essentially act as proxy
servers that sit between web applications, the
browser, and the network (when available).
They can be used to serve network responses
from cache instead of a network.
@filrakowski
Service
Worker
NetworkClient app
@filrakowski
Service
Worker
Network
Client app
Cache
If asset was previously
downloaded
If asset is not in cache
or needs to be „fresh”
@filrakowski
Vue CLI PWA plugin
@filrakowski
@filrakowski
Nuxt PWA module
@filrakowski
@filrakowski
@filrakowski
What else we can do?
@filrakowski
Prefetching downloading assets before they’re
requested.
@filrakowski
Rule #6 - Prefetch lazily loaded resources
@filrakowski
@filrakowski
More general options
webpack precachePlugin
workbox-webpack-plugin
@filrakowski
Vue-cli 3 is prefetching lazy chunks out of the box!
@filrakowski
Don’t forget about compression, minification and other
stuff that webpack and DevOps will do for you
@filrakowski
Measure. 



Otherwise you can’t tell if there was any
improvement
@filrakowski
#1 Dev tools “coverage” tool
@filrakowski
CMD + Shift + P “Coverage”
@filrakowski
Everything marked with red should probably be loaded lazily
@filrakowski
#2 Webpack bundle analyzer
@filrakowski
@filrakowski
@filrakowski
#2 ‘bundlesize’ package
@filrakowski
@filrakowski
@filrakowski
#3 VS Code ‘Import cost’ plugin
@filrakowski
@filrakowski
Deliver proper waiting experience
@filrakowski
@filrakowski@filrakowski
@filrakowski
Loaders
@filrakowski
@filrakowski
Placeholders
@filrakowski
@filrakowski@filrakowski
When to use?
- component is loading
- data is loading
@filrakowski
@filrakowski
Vue Async Component
@filrakowski
React Suspense
@filrakowski
Managing Complex Waiting
Experiences on Web UIs



Fatih Kadir Akın
https://medium.com/@fkadev/managing-complex-waiting-experiences-on-web-uis-29534d2d92a8
@filrakowski
Thank you!
@filrakowski

More Related Content

What's hot (20)

PPTX
ReactJS maakt het web eenvoudig
Rick Beerendonk
 
PDF
React native first impression
Alvaro Viebrantz
 
PDF
Building CI/CD Pipelines for MongoDB Realm Apps
Lauren Hayward Schaefer
 
PPTX
DevOps + MongoDB Serverless = 
Lauren Hayward Schaefer
 
PPTX
Building Chatbots
Tessa Mero
 
PDF
BIW15: Python in the Cloud: Django and Flaks
Alex Viana
 
PPTX
Chatbots
Tessa Mero
 
PDF
Instant app Intro
Jintin Lin
 
PDF
Java Cloud and Container Ready
CodeOps Technologies LLP
 
PPTX
Publishing API documentation -- Presentation
Tom Johnson
 
PDF
GR8Conf 2015 - Spring Boot and Groovy. What more do you need?
Iván López Martín
 
PDF
Gears and HTML 5 @media Ajax London 2008
dion
 
PDF
What I learned teaching programming to 150 beginners
Etiene Dalcol
 
PDF
Building Gutenberg Applications & WebOPS Case Study
Roy Sivan
 
PDF
Use groovy & grails in your spring boot projects
Fátima Casaú Pérez
 
PDF
Javascript State of the Union 2015 - English
Huge
 
PDF
Write Once, Run Everywhere
Mike North
 
PDF
Rags to Open Source - AllThingsOpen, Raleigh, NC 2014
Mike McNeil
 
PDF
The Ultimate Getting Started with Angular Workshop - Devoxx France 2017
Matt Raible
 
PPT
1ST TECH TALK: "Yii : The MVC framework" by Benedicto B. Balilo Jr.
Bicol IT.org
 
ReactJS maakt het web eenvoudig
Rick Beerendonk
 
React native first impression
Alvaro Viebrantz
 
Building CI/CD Pipelines for MongoDB Realm Apps
Lauren Hayward Schaefer
 
DevOps + MongoDB Serverless = 
Lauren Hayward Schaefer
 
Building Chatbots
Tessa Mero
 
BIW15: Python in the Cloud: Django and Flaks
Alex Viana
 
Chatbots
Tessa Mero
 
Instant app Intro
Jintin Lin
 
Java Cloud and Container Ready
CodeOps Technologies LLP
 
Publishing API documentation -- Presentation
Tom Johnson
 
GR8Conf 2015 - Spring Boot and Groovy. What more do you need?
Iván López Martín
 
Gears and HTML 5 @media Ajax London 2008
dion
 
What I learned teaching programming to 150 beginners
Etiene Dalcol
 
Building Gutenberg Applications & WebOPS Case Study
Roy Sivan
 
Use groovy & grails in your spring boot projects
Fátima Casaú Pérez
 
Javascript State of the Union 2015 - English
Huge
 
Write Once, Run Everywhere
Mike North
 
Rags to Open Source - AllThingsOpen, Raleigh, NC 2014
Mike McNeil
 
The Ultimate Getting Started with Angular Workshop - Devoxx France 2017
Matt Raible
 
1ST TECH TALK: "Yii : The MVC framework" by Benedicto B. Balilo Jr.
Bicol IT.org
 

Similar to Filip Rakowski "Web Performance in modern JavaScript world" (20)

PPTX
Performance optimization of vue.js apps with modern js
Filip Rakowski
 
PDF
How to optimize the performance of vue js large application structure
Katy Slemon
 
PDF
The Journey of a Pixel in a React Application
Shem Magnezi
 
PDF
Front-End Performance Checklist 2020
Harsha MV
 
PDF
Using React for the Mobile Web
C4Media
 
PDF
Bringing the JAMstack to the Enterprise
Jamund Ferguson
 
PDF
Thinking Beyond Core Web Vitals - Web performance optimisations for the harsh...
Anna Migas
 
PDF
VueJS in Action
Rafael Casuso Romate
 
PPT
Smarr Oscon 2007
briandemant
 
PPT
Os Smarr
oscon2007
 
PDF
How we improved performance at Mixbook
Anton Astashov
 
PDF
Scalable Front-end Development with Vue.JS
Galih Pratama
 
PDF
Production optimization with React and Webpack
k88hudson
 
PPTX
Cut it up
FITC
 
PDF
10 Web Performance Lessons For the 21st Century
Mateusz Kwasniewski
 
PDF
The secret web performance metric no one is talking about
Anna Migas
 
PDF
Ten practical ways to improve front-end performance
Andrew Rota
 
PDF
Engineering HTML5 Applications for Better Performance
SC5.io
 
KEY
A rough guide to JavaScript Performance
allmarkedup
 
PDF
Optimizing a React application for Core Web Vitals
Juan Picado
 
Performance optimization of vue.js apps with modern js
Filip Rakowski
 
How to optimize the performance of vue js large application structure
Katy Slemon
 
The Journey of a Pixel in a React Application
Shem Magnezi
 
Front-End Performance Checklist 2020
Harsha MV
 
Using React for the Mobile Web
C4Media
 
Bringing the JAMstack to the Enterprise
Jamund Ferguson
 
Thinking Beyond Core Web Vitals - Web performance optimisations for the harsh...
Anna Migas
 
VueJS in Action
Rafael Casuso Romate
 
Smarr Oscon 2007
briandemant
 
Os Smarr
oscon2007
 
How we improved performance at Mixbook
Anton Astashov
 
Scalable Front-end Development with Vue.JS
Galih Pratama
 
Production optimization with React and Webpack
k88hudson
 
Cut it up
FITC
 
10 Web Performance Lessons For the 21st Century
Mateusz Kwasniewski
 
The secret web performance metric no one is talking about
Anna Migas
 
Ten practical ways to improve front-end performance
Andrew Rota
 
Engineering HTML5 Applications for Better Performance
SC5.io
 
A rough guide to JavaScript Performance
allmarkedup
 
Optimizing a React application for Core Web Vitals
Juan Picado
 
Ad

More from Fwdays (20)

PPTX
"Як ми переписали Сільпо на Angular", Євген Русаков
Fwdays
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
"Validation and Observability of AI Agents", Oleksandr Denisyuk
Fwdays
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PPTX
"Co-Authoring with a Machine: What I Learned from Writing a Book on Generativ...
Fwdays
 
PPTX
"Human-AI Collaboration Models for Better Decisions, Faster Workflows, and Cr...
Fwdays
 
PDF
"AI is already here. What will happen to your team (and your role) tomorrow?"...
Fwdays
 
PPTX
"Is it worth investing in AI in 2025?", Alexander Sharko
Fwdays
 
PDF
''Taming Explosive Growth: Building Resilience in a Hyper-Scaled Financial Pl...
Fwdays
 
PDF
"Scaling in space and time with Temporal", Andriy Lupa.pdf
Fwdays
 
PDF
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 
PDF
"Scaling in space and time with Temporal", Andriy Lupa .pdf
Fwdays
 
PPTX
"Provisioning via DOT-Chain: from catering to drone marketplaces", Volodymyr ...
Fwdays
 
PPTX
" Observability with Elasticsearch: Best Practices for High-Load Platform", A...
Fwdays
 
PPTX
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
Fwdays
 
PPTX
"Istio Ambient Mesh in production: our way from Sidecar to Sidecar-less",Hlib...
Fwdays
 
PPTX
" How to survive with 1 billion vectors and not sell a kidney: our low-cost c...
Fwdays
 
PPTX
"Confidential AI: zero trust concept", Hennadiy Karpov
Fwdays
 
PPTX
"Choosing Tensor Accelerators for Specific Tasks: Compute vs Memory Bound Mod...
Fwdays
 
"Як ми переписали Сільпо на Angular", Євген Русаков
Fwdays
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
"Validation and Observability of AI Agents", Oleksandr Denisyuk
Fwdays
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
"Co-Authoring with a Machine: What I Learned from Writing a Book on Generativ...
Fwdays
 
"Human-AI Collaboration Models for Better Decisions, Faster Workflows, and Cr...
Fwdays
 
"AI is already here. What will happen to your team (and your role) tomorrow?"...
Fwdays
 
"Is it worth investing in AI in 2025?", Alexander Sharko
Fwdays
 
''Taming Explosive Growth: Building Resilience in a Hyper-Scaled Financial Pl...
Fwdays
 
"Scaling in space and time with Temporal", Andriy Lupa.pdf
Fwdays
 
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 
"Scaling in space and time with Temporal", Andriy Lupa .pdf
Fwdays
 
"Provisioning via DOT-Chain: from catering to drone marketplaces", Volodymyr ...
Fwdays
 
" Observability with Elasticsearch: Best Practices for High-Load Platform", A...
Fwdays
 
"How to survive Black Friday: preparing e-commerce for a peak season", Yurii ...
Fwdays
 
"Istio Ambient Mesh in production: our way from Sidecar to Sidecar-less",Hlib...
Fwdays
 
" How to survive with 1 billion vectors and not sell a kidney: our low-cost c...
Fwdays
 
"Confidential AI: zero trust concept", Hennadiy Karpov
Fwdays
 
"Choosing Tensor Accelerators for Specific Tasks: Compute vs Memory Bound Mod...
Fwdays
 
Ad

Recently uploaded (20)

PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PPTX
Designing Production-Ready AI Agents
Kunal Rai
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Advancing WebDriver BiDi support in WebKit
Igalia
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Biography of Daniel Podor.pdf
Daniel Podor
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Designing Production-Ready AI Agents
Kunal Rai
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Advancing WebDriver BiDi support in WebKit
Igalia
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
July Patch Tuesday
Ivanti
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 

Filip Rakowski "Web Performance in modern JavaScript world"