Top Banner
PRPL with & Grgur Grisogono @ggrgur Modus Create @moduscreate
20

PRPL Pattern with Webpack and React

Jan 08, 2017

Download

Technology

Grgur Grisogono
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: PRPL Pattern with Webpack and React

PRPL with &

Grgur Grisogono @ggrgur

Modus Create @moduscreate

Page 2: PRPL Pattern with Webpack and React

Grgur Grisogono

Software Architect@moduscreate

Page 3: PRPL Pattern with Webpack and React

Cras justo,

dapibus ac

facilisis in,

egestas

eget quam.

⚠ Problems

🌍 Mobile web is slow

📱

Avg mobile device is low/mid end

Computing moved to client side

Page 4: PRPL Pattern with Webpack and React

53% of visitors abandon sites if it

takes more than 3 seconds to load

Google DoubleClick

Page 5: PRPL Pattern with Webpack and React

Mobify

100msdecrease in loading

1.11%conversion increase

Page 6: PRPL Pattern with Webpack and React

1kbJavaScript

1msParse Time

Page 7: PRPL Pattern with Webpack and React

Avg Content/Page

2010

113 kB 702 kB

httparchive.org

2016

420 kB 2469 kB

Year

JS All

Page 8: PRPL Pattern with Webpack and React

Download on 3G 4 seconds

Cost of 420kB JS

Parse time 400+ ms

Page 9: PRPL Pattern with Webpack and React

CACHING

1

2

GOALSMinimum Time to Initial Impression

Minimum Time to Interactive

Page 10: PRPL Pattern with Webpack and React

Strategy Technology

PRPL:

Page 11: PRPL Pattern with Webpack and React

Push

Render

Pre-cache

Lazy-load

critical resources

route

successor routes

routes on demand

Page 12: PRPL Pattern with Webpack and React

Request App Shell

Route

Interactive

Preload chunks

Dependencies

Routes

Dependencies

Possible successors

(HTTP2 Push)

Minimal architecture

Pre-render

Preload APIs

Switch route

Execute JS

Cache

PRPL Workflow

Page 13: PRPL Pattern with Webpack and React

bit.ly/prpl-wpack

Demo🍿Bundled SPA

vs Chunks & Preloading

Page 14: PRPL Pattern with Webpack and React

No add-ons🚫📶Regular 3Gbandwidth throttling

5x CPU throttling 🐢 No caching💾

Testing Environment

Page 15: PRPL Pattern with Webpack and React

23.0KB

67.7KB

App Core Size34% of the original

Page 16: PRPL Pattern with Webpack and React

600.0ms

1,550.0ms

Core DL Time38% of the original

Page 17: PRPL Pattern with Webpack and React

256.0ms

870.0ms

Scripting Time29% of the original

Page 18: PRPL Pattern with Webpack and React

1,750ms

3,000ms

Time to Interactive58% of the original

+14% conversion 💰

Page 19: PRPL Pattern with Webpack and React

Branches: step-0 to step-6

Try yourselfbit.ly/prpl-wpack

Page 20: PRPL Pattern with Webpack and React

Reach out! 🙌

moduscreate.com @moduscreate

Grgur Grisogono @ggrgur