31
Building High Performance Websites

Building High Performance Websites

Embed Size (px)

DESCRIPTION

Building High Performance Websites

Citation preview

Page 1: Building High Performance Websites

Building High Performance Websites

Page 2: Building High Performance Websites

2 April 10, 2023

I. Speed as Feature

II. Trend

III. 3 Pillars of Performance

IV. Network

V. Rendering

VI. Hacks

VII. Questions

Agenda

Page 3: Building High Performance Websites

3 April 10, 2023

Speed as Feature

Page 4: Building High Performance Websites

4 April 10, 2023

Everybody's got that one thing that makes them happy. For me, it's terrifying blazing speed. ~ Theo [Turbo (2013)]

Page 5: Building High Performance Websites

5 April 10, 2023

What's the impact of slow sites?

Page 6: Building High Performance Websites

6 April 10, 2023

Speed Matters

Page 7: Building High Performance Websites

7 April 10, 2023

Page 8: Building High Performance Websites

8 April 10, 2023

Usability Engineering 101

Page 9: Building High Performance Websites

9 April 10, 2023

Trend

Page 10: Building High Performance Websites

10 April 10, 2023

Trend Contd..

Page 11: Building High Performance Websites

11 April 10, 2023

Page 12: Building High Performance Websites

12 April 10, 2023

3 Pillars of Performance

NETWORK RENDER COMPUTE

“Good developers know how things work. Great developers know why things work.” ~ Steve Souders, Head Performance Engineer, Google, 2013

Page 13: Building High Performance Websites

13 April 10, 2023

Latency? Bandwidth?

Source: https://www.igvita.com

Page 14: Building High Performance Websites

14 April 10, 2023

Latency vs. Bandwidth impact on Page Load Time

“To speed up the Internet at large, we should look for more ways to bring down RTT. What if we could reduce cross-atlantic RTTs from 150 ms to 100 ms? This would have a larger effect on the speed of the internet than increasing a user’s bandwidth from 3.9 Mbps to 10 Mbps or even 1 Gbps.” - Mike Belshe

Single digit % perf improvement after

5 Mbps

Linear improvement in page load time!

Source: https://www.igvita.com

Page 15: Building High Performance Websites

15 April 10, 2023

Components of an HTTP request

• DNS lookup to resolve the hostname to IP address

• New TCP connection requires a handshake round trip to the server

• TLS handshake (not shown) with up to two extra server round trips

• HTTP request requires minimum of a one round trip to the servero Plus server processing time

Source: https://www.igvita.com

Page 16: Building High Performance Websites

16 April 10, 2023

Minimize HTTP Requests

Page 17: Building High Performance Websites

17 April 10, 2023

Reduce DNS Lookups

Page 18: Building High Performance Websites

18 April 10, 2023

Use a Content Delivery Network

Page 19: Building High Performance Websites

19 April 10, 2023

Add an Expires/a Cache-Control Header, Configure ETags

Page 20: Building High Performance Websites

20 April 10, 2023

GZip Components, Minify JavaScript and CSS

http://www.flickr.com/photos/marcovdz/4520986339/

Page 21: Building High Performance Websites

21 April 10, 2023

Put Style Sheets at the Top, Put Scripts at the Bottom

Page 22: Building High Performance Websites

22 April 10, 2023

Make JavaScript &

CSS External

Page 23: Building High Performance Websites

23 April 10, 2023

Optimize Images, Optimize CSS Sprites

Page 24: Building High Performance Websites

24 April 10, 2023

Split Components Across Domains

http://www.flickr.com/photos/autowitch/4271929/

Page 25: Building High Performance Websites

25 April 10, 2023

Reduce Cookie Size, Use Cookie-free Domains for Components

Page 26: Building High Performance Websites

26 April 10, 2023

• Avoid CSS Expressions• Avoid Redirects• Remove Duplicate Scripts• Make Ajax Cacheable• Configure Etags• Use GET for AJAX Requests• Post-load Components• Preload Components• Reduce the Number of DOM Elements• Minimize the Number of iframes• Minimize DOM Access• Choose <link> over @import• Avoid Filters• Make favicon.ico Small and Cacheable• Avoid Empty Image src

Page 27: Building High Performance Websites

27 April 10, 2023

Prioritize your content ..

Page 28: Building High Performance Websites

28 April 10, 2023

Page 29: Building High Performance Websites

29 April 10, 2023

Thank You

Page 31: Building High Performance Websites

31 April 10, 2023

Books..