Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Optimizing Contents Delivery
Search
Gen
March 24, 2017
Programming
41
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Optimizing Contents Delivery
Gen
March 24, 2017
More Decks by Gen
See All by Gen
VRT
gen
0
36
Introduction to WebRTC
gen
0
270
Introduction to ECS
gen
0
61
Introduction to multiplayer netcode
gen
0
97
Introduction to WebGL
gen
0
66
部屋のワイシャツとカメラと私
gen
0
410
Interaction designer のお仕事
gen
0
90
Other Decks in Programming
See All in Programming
ジョジョの世界をXRで再現する
mofurune
0
170
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
380
最近”作らせてる” ローカルAIアプリの話
akit37
0
470
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
カツオ、ご期待ください
suneo3476
0
190
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
120
The Rails Doctrine Decade
koic
2
590
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
320
APNsからLive Activityを開始する話
yumnumm
0
170
すこし踏み込む CancellationToken
htkym
2
1.7k
Simple Storage Service(S3) is not simple
iwatsukayura
0
290
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
190
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
480
Six Lessons from altMBA
skipperchong
29
4.5k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
570
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Odyssey Design
rkendrick25
PRO
2
870
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Balancing Empowerment & Direction
lara
6
1.3k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
Transcript
Optimizing Contents Delivery Gen Ichino<@zenoplex>
໔ࣄ߲ (͍͍Θ͚λΠϜ) • FP, FRP ͷ͠·ͤΜ • Rx ͷ͠·ͤΜ •
τʔΫεΫϦϓτ࿅श͍ͯ͠ͳ͍Ͱ͢ • 2018 ʹ͋ͨΓલʹͳΔ͔͠Εͳ͍
“Mobile First” FTW http://gs.statcounter.com/press/mobile-and-tablet-internet-usage-exceeds- desktop-for- fi rst-time-worldwide
Code splitting
Why?
bundle.js
bundle.js vendor.js
Long-term caching • มߋ͕΄ͱΜͲೖΒͳ͍Ϟδϡʔϧ܈ • bundle໊ʹhashΛ͏ • max-age: 31536000 (RFC
2616) • CDN
vendor.js Home Settings User menu button Login
How?
es6 Dynamic Import // sync import React from 'react'; //
sync import { Component } from 'react'; // async const AsyncModulePromise = import('../some_modules');
import() • babel-plugin: syntax-dynamic-import • Stage 3 • Webpack 2
• (path: string) => Promise<*> • Support dynamic module name
DEMO https://syntax-dynamic-import-sample.herokuapp.com/
Webpack
React
React Components • Functions • Classes • Promises
DEMO https://syntax-dynamic-import-react-sa.herokuapp.com/
Where?
Where to code split • Route level • High Order
Components
DEMO https://syntax-dynamic-import-react-sa.herokuapp.com/about
Overhead • Heroku still only supports HTTP/1.1 • Overuse can
lead to less user experience
Is JavaScript mobile friendly?
Responsive Component • Mobile First JavaScript • Always render Mobile
Components • Lazy load Desktop Components when and only if necessary
Thx