Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Optimizing Contents Delivery
Search
Gen
March 24, 2017
Programming
0
28
Optimizing Contents Delivery
Gen
March 24, 2017
Tweet
Share
More Decks by Gen
See All by Gen
VRT
gen
0
7
Introduction to WebRTC
gen
0
230
Introduction to ECS
gen
0
38
Introduction to multiplayer netcode
gen
0
74
Introduction to WebGL
gen
0
50
部屋のワイシャツとカメラと私
gen
0
410
Interaction designer のお仕事
gen
0
81
Other Decks in Programming
See All in Programming
A Gopher's Guide to Vibe Coding
danicat
0
170
kiroでゲームを作ってみた
iriikeita
0
180
あなたとJIT, 今すぐアセンブ ル
sisshiki1969
1
700
The state patternの実践 個人開発で培ったpractice集
miyanokomiya
0
140
Jakarta EE Core Profile and Helidon - Speed, Simplicity, and AI Integration
ivargrimstad
0
110
新しいモバイルアプリ勉強会(仮)について
uetyo
1
260
Infer入門
riru
4
1.5k
JetBrainsのAI機能の紹介 #jjug
yusuke
0
210
Amazon Q CLI開発で学んだAIコーディングツールの使い方
licux
3
190
パスタの技術
yusukebe
1
390
実践!App Intents対応
yuukiw00w
1
320
Claude Codeで実装以外の開発フロー、どこまで自動化できるか?失敗と成功
ndadayo
2
560
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Writing Fast Ruby
sferik
628
62k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
50
5.5k
Fireside Chat
paigeccino
39
3.6k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
1k
The Cult of Friendly URLs
andyhume
79
6.5k
RailsConf 2023
tenderlove
30
1.2k
Building Applications with DynamoDB
mza
96
6.6k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.9k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
The Pragmatic Product Professional
lauravandoore
36
6.8k
Designing Experiences People Love
moore
142
24k
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