SlideShare a Scribd company logo
Because Performance Matters!
2
Motivation
Agenda
Case study exploration
Load time enhancement techniques
About Me
3
Vered Flis
https://www.linkedin.com/in/vered-flis/
Senior SW Engineer |
veredf@codevalue.net
CodeValue
Why should I even care?
Performance issues directly affect the end users experience
4
Slow website speed turns users off
Slow websites cost money and damage reputation
5
1 second delay means 7% reduction in conversions
1 second delay means 11% loss of page views (SEO)
Let’s get statistical (Hubspot research)
47% of the users expects a website to load < 2sec
Page slowdown of 1 second could cost Amazon $1.6 billion/year
79% of users who experience poor performance are less likely to visit again
You won’t get a
second chance
when it comes to
user experience
“
“
7
High-performant websites results in :
Higher traffic
High return visits
Low bounce rates
Higher conversions
Higher engagement
Higher ranks in organic search
8
Google’s ‘Badge of Shame’
Making performance
a business priority
“
“
10
What Is Performance Anyway?
CPU
Speed Memory
Load Time
Reload Time
ALL?
11
Not everything is important for everybody
Different needs for different users
Different needs for different devices
Different needs for different systems
12
User Centric Approach
HOW ?
Engineering experience
in service of
user experience
“
“
14
Case Study @CodeValue
Angular 6 app Wanted to scale
Wanted to improve SEO rankHigh computations
Long load time
15
Performance Categories to tackle
Load Time (Initial and Reload)
Runtime Performance
16
User Centric Metrics Measured
First Meaningful Paint
Time To Interactive ( TTI )
Loading Is a Journey…
18
Goals
Under 5s Time to Interactive for 3G
Under 170 KB of critical path resources (compressed/minified)
19
Actions that were taken
Upgrading Angular version - Ivy
Lazy loading modules
Assets Size – trivial but critical, images optimization
Fast hosting , compression and CDN
More….
20
Know your Bundles!
Look for unused packages
Replace large packages if possible
Remove unnecessary imports
21
Using webpack-bundle-analyzer
> npm install -g webpack-bundle-analyzer
> ng build --stats-json
> webpack-bundle-analyzer “../dist/my-performant-project/stats.json“
Webpack Bundle Analyzer is started at http://127.0.0.1:8888
Introducing performance “Budgets”
22
Set and Monitor bundle size thresholds
Performed at build time
Integrated as part of CI/CD
Highlight the impact of heavy assets
23
“Budges” types
Bundle - The size of a specific bundle
Initial - The initial size of the app
All - The size of the entire app
24
Defining Angular “Budgets”
{
. . .
“configuration“ : {
“production“ : {
. . .
}
}
}
angular.json
“budgets“ : [
{
"type": “bundle",
“name": “main",
"maximumWarning": “150kb",
"maximumError": “200kb"
}
]
25
WARNING in budgets, maximum exceeded for main. Budget 150 kB was exceeded by 218 kB.
ERROR in budgets, maximum exceeded for main. Budget 200 kB was exceeded by 168 kB.
> ng build --prod
Using Lighthouse for performance “Budgets”
26
Monitor performance metrics at run time
Provides metrics to track whole team work
Can be integrated as part of CI/CD
Aligned the team around common metric goals
27
Defining Lighthouse “Budgets” file
budgets.json
[
{
. . .
"timings": [
{
"metric": "interactive",
"budget": 3000
},
{
"metric": "first-meaningful-paint",
"budget": 1000
}
]
}
]
28
Using lighthouse “Budgets”
> npm install -g lighthouse
> Lighthouse https://example.com --budget-path=./budgets.json
Results lighthouse-budgets-report
lighthouse
29
Introducing “App shells”
Provides a fast first impression
Provide the user with the perception of a faster page load
Launching a static rendered page while the browser loads assets
30
Angular App Shell
> ng new app-shell-example --routing
> ng add @nguniversal/express-engine --client-project app-shell-example
> ng run app-shell-example:app-shell
> ng generate app-shell --client-project app-shell-example --universal-project
app-shell-example-server
31
Without App Shell
Index.html
<body>
<app-root></app-root>
<script src="runtime-es2015.cdfb0ddb511f65fdc0a0.js" type="module"></script>
<script src="runtime-es5.cdfb0ddb511f65fdc0a0.js" nomodule defer></script>
<script src="polyfills-es5.44547b4d4a23c72d0f9c.js" nomodule defer></script>
<script src="polyfills-es2015.ffa9bb4e015925544f91.js" type="module"></script>
<script src="main-es2015.0c419ad3828622f71e56.js" type="module"></script>
<script src="main-es5.0c419ad3828622f71e56.js" nomodule defer></script>
</body>
32
With App Shell
Index.html
<body>
<app-root _nghost-sc0="" >
<div _ngcontent-sc0=""><span _ngcontent-sc0="">App Shell Is Running</span></div>
<router-outlet _ngcontent-sc0=""></router-outlet>
<app-app-shell _nghost-sc1="">
<p _ngcontent-sc1="">My APP SHELL</p>
</app-app-shell>
</app-root>
<script src="runtime-es2015.cdfb0ddb511f65fdc0a0.js" type="module"></script>
<script src="runtime-es5.cdfb0ddb511f65fdc0a0.js" nomodule defer></script>
<script src="polyfills-es5.44547b4d4a23c72d0f9c.js" nomodule defer></script>
<script src="polyfills-es2015.ffa9bb4e015925544f91.js" type="module"></script>
<script src="main-es2015.0c419ad3828622f71e56.js" type="module"></script>
<script src="main-es5.0c419ad3828622f71e56.js" nomodule defer></script>
</body>
33
Lazy loading with Preloading Strategy
Loading Lazy Modules asynchronously in the background
User do not have to wait for a lazy module to be downloaded
34
Preloading Options
No preloading
Preload all lazy modules
Custom preloading
35
PreloadAllModules
RouterModule.forRoot(routes, {preloadingStrategy: PreloadAllModules})
Preloading ALL
may create a bottleneck
when large # of modules
are loaded
37
Loading Strategy
Eagerly Load the modules required at startup
Preload all frequently used modules, may be after some delay
Lazy load remaining modules
38
Takeaways
High performant web apps is a combination of
Art Best Practices Sleight Of Hand
Set a shared goals and be creative
Understand your user’s needs
Make performance a business priority
Q
A
39
Vered Flis
Senior SW Engineer | Project Lead
veredf@codevalue.net

More Related Content

PPTX
C# Production Debugging Made Easy
PPTX
We come in peace hybrid development with web assembly - Maayan Hanin
PDF
Alex Pshul: What We Learned by Testing Execution of 300K Messages/Min in a Se...
PPTX
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
PPTX
Will the Real Public API Please Stand Up? Amir Zuker
PDF
Progressive Web Apps. What, why and how
PDF
"Building Cross-platform Without Sacrificing Performance" by Simon Sturmer (K...
PDF
What makes me to migrate entire VPC JAWS PANKRATION 2021
C# Production Debugging Made Easy
We come in peace hybrid development with web assembly - Maayan Hanin
Alex Pshul: What We Learned by Testing Execution of 300K Messages/Min in a Se...
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
Will the Real Public API Please Stand Up? Amir Zuker
Progressive Web Apps. What, why and how
"Building Cross-platform Without Sacrificing Performance" by Simon Sturmer (K...
What makes me to migrate entire VPC JAWS PANKRATION 2021

What's hot (19)

PPTX
Blazor and Azure Functions - a serverless approach
PPTX
Build 2017 - B8013 - Developing on Windows Server: Innovation for today and t...
PDF
Real World Progressive Web Apps (Building Flipkart Lite)
PDF
Magnus Mårtensson: The Cloud challenge is more than just technical – people a...
PDF
"Serverless: The Future of Software Architecture" by Jason Wihardja (Bizzy In...
PDF
Nir Doboviski: In Space No One Can Hear Microservices Scream – a Microservice...
PDF
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
PPTX
Azure Web Jobs
PDF
Андрей Бойко - Azure Web App для PHP и Node.Js разработчиков
PPTX
Maurice de Beijer
PPTX
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
PDF
Making Sense of Serverless Computing
PDF
1. Let's study web-development
PDF
Go Serverless with Java and Azure Functions
PPTX
Forms + azure
PDF
The Business Value of a PaaS (presented by Kieron Sambrook Smith, Chief Comme...
PPTX
Event sourcing your React-Flux applications
PDF
Node @ flipkart
PPTX
Serverless tools for integrating systems
Blazor and Azure Functions - a serverless approach
Build 2017 - B8013 - Developing on Windows Server: Innovation for today and t...
Real World Progressive Web Apps (Building Flipkart Lite)
Magnus Mårtensson: The Cloud challenge is more than just technical – people a...
"Serverless: The Future of Software Architecture" by Jason Wihardja (Bizzy In...
Nir Doboviski: In Space No One Can Hear Microservices Scream – a Microservice...
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
Azure Web Jobs
Андрей Бойко - Azure Web App для PHP и Node.Js разработчиков
Maurice de Beijer
BUILD, TEST & DEPLOY .NET CORE APPS IN AZURE DEVOPS
Making Sense of Serverless Computing
1. Let's study web-development
Go Serverless with Java and Azure Functions
Forms + azure
The Business Value of a PaaS (presented by Kieron Sambrook Smith, Chief Comme...
Event sourcing your React-Flux applications
Node @ flipkart
Serverless tools for integrating systems
Ad

Similar to Vered Flis: Because performance matters! Architecture Next 20 (20)

PDF
Rethinking Angular Architecture & Performance
PDF
Methodically Improving Performance of Angular Apps
PDF
Angular - Improve Runtime performance 2019
PDF
Progressive Web Application by Citytech
PDF
Angular performance slides
PPTX
Performance on a budget
PDF
Lighthouse
PDF
Front-End Performance Checklist 2020
PDF
The secret web performance metric no one is talking about
PPTX
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
PDF
How To Tweak Angular 2 Performance (JavaScript Frameworks Day 2017 Kiev)
PPTX
Building high performance web applications
PDF
Angular Optimization Web Performance Meetup
PDF
Web performance optimisations for the harsh conditions - Anna Migas
PDF
Web performance optimisations for the harsh conditions.pdf
PPTX
Making Single Page Applications (SPA) faster
PPTX
Velocity spa faster_092116
PDF
Runtime performance
PPTX
Building Advanced Web UI in The Enterprise World
PPTX
Shining a light on performance (js meetup)
Rethinking Angular Architecture & Performance
Methodically Improving Performance of Angular Apps
Angular - Improve Runtime performance 2019
Progressive Web Application by Citytech
Angular performance slides
Performance on a budget
Lighthouse
Front-End Performance Checklist 2020
The secret web performance metric no one is talking about
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
How To Tweak Angular 2 Performance (JavaScript Frameworks Day 2017 Kiev)
Building high performance web applications
Angular Optimization Web Performance Meetup
Web performance optimisations for the harsh conditions - Anna Migas
Web performance optimisations for the harsh conditions.pdf
Making Single Page Applications (SPA) faster
Velocity spa faster_092116
Runtime performance
Building Advanced Web UI in The Enterprise World
Shining a light on performance (js meetup)
Ad

More from CodeValue (20)

PPTX
Digital transformation buzzword or reality - Alon Fliess
PPTX
The IDF's journey to the cloud - Merav
PPTX
When your release plan is concluded at the HR office - Hanan Zakai
PPTX
The IoT Transformation and What it Means to You - Nir Dobovizky
PPTX
State in stateless serverless functions - Alex Pshul
PPTX
How I built a ml human hybrid workflow using computer vision - Amir Shitrit
PDF
Application evolution strategy - Eran Stiller
PPTX
Designing products in the digital transformation era - Eyal Livne
PPTX
Eerez Pedro: Product thinking 101 - Architecture Next
PDF
Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20
PDF
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...
PDF
Ronen Levinson: Unified policy enforcement with opa - Architecture Next 20
PPTX
Moaid Hathot: Dapr the glue to your microservices - Architecture Next 20
PPTX
Eyal Ellenbogen: Building a UI Foundation for Scalability - Architecture Next 20
PDF
Michael Donkhin: Java Turns 25 - How Is It Faring and What Is Yet to Come Arc...
PDF
Eran Stiller: API design in the modern era - architecture next 2020
PPTX
Web assembly - Future of the Web
PPTX
Unmeshing the service mesh
PPTX
Data analytics at scale implementing stateful stream processing - publish
PPTX
A serverless IoT story from design to production and monitoring
Digital transformation buzzword or reality - Alon Fliess
The IDF's journey to the cloud - Merav
When your release plan is concluded at the HR office - Hanan Zakai
The IoT Transformation and What it Means to You - Nir Dobovizky
State in stateless serverless functions - Alex Pshul
How I built a ml human hybrid workflow using computer vision - Amir Shitrit
Application evolution strategy - Eran Stiller
Designing products in the digital transformation era - Eyal Livne
Eerez Pedro: Product thinking 101 - Architecture Next
Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...
Ronen Levinson: Unified policy enforcement with opa - Architecture Next 20
Moaid Hathot: Dapr the glue to your microservices - Architecture Next 20
Eyal Ellenbogen: Building a UI Foundation for Scalability - Architecture Next 20
Michael Donkhin: Java Turns 25 - How Is It Faring and What Is Yet to Come Arc...
Eran Stiller: API design in the modern era - architecture next 2020
Web assembly - Future of the Web
Unmeshing the service mesh
Data analytics at scale implementing stateful stream processing - publish
A serverless IoT story from design to production and monitoring

Recently uploaded (20)

PDF
AI in Product Development-omnex systems
PPT
Introduction Database Management System for Course Database
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Understanding Forklifts - TECH EHS Solution
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
ISO 45001 Occupational Health and Safety Management System
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PPTX
Online Work Permit System for Fast Permit Processing
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
System and Network Administraation Chapter 3
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
AI in Product Development-omnex systems
Introduction Database Management System for Course Database
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Understanding Forklifts - TECH EHS Solution
How to Migrate SBCGlobal Email to Yahoo Easily
ISO 45001 Occupational Health and Safety Management System
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
ManageIQ - Sprint 268 Review - Slide Deck
Online Work Permit System for Fast Permit Processing
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Wondershare Filmora 15 Crack With Activation Key [2025
PTS Company Brochure 2025 (1).pdf.......
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
System and Network Administraation Chapter 3
Upgrade and Innovation Strategies for SAP ERP Customers
How Creative Agencies Leverage Project Management Software.pdf
How to Choose the Right IT Partner for Your Business in Malaysia
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)

Vered Flis: Because performance matters! Architecture Next 20