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
29
Optimizing Contents Delivery
Gen
March 24, 2017
Tweet
Share
More Decks by Gen
See All by Gen
VRT
gen
0
13
Introduction to WebRTC
gen
0
230
Introduction to ECS
gen
0
40
Introduction to multiplayer netcode
gen
0
80
Introduction to WebGL
gen
0
51
部屋のワイシャツとカメラと私
gen
0
410
Interaction designer のお仕事
gen
0
84
Other Decks in Programming
See All in Programming
エラーログのマスキングの仕組みづくりに役立ったASTの話
kumoichi
0
240
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
230
今からFlash開発できるわけないじゃん、ムリムリ! (※ムリじゃなかった!?)
arkw
0
110
Angular-Apps smarter machen mit Gen AI: Lokal und offlinefähig - Hands-on Workshop!
christianliebel
PRO
0
120
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
260
[SF Ruby Feb'26] The Silicon Heel
palkan
0
110
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
660
へんな働き方
yusukebe
4
2.4k
SourceGeneratorのマーカー属性問題について
htkym
0
200
Understanding Apache Lucene - More than just full-text search
spinscale
0
130
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
610
AWS Infrastructure as Code の新機能 2025 総まとめ 〜SA 4人による怒涛のデモ祭り〜
konokenj
10
3.4k
Featured
See All Featured
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
200
Exploring anti-patterns in Rails
aemeredith
2
290
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
64
52k
How GitHub (no longer) Works
holman
316
150k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.5k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
980
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
The Curious Case for Waylosing
cassininazir
0
270
Design in an AI World
tapps
0
170
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
560
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