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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
12
Introduction to WebRTC
gen
0
230
Introduction to ECS
gen
0
40
Introduction to multiplayer netcode
gen
0
77
Introduction to WebGL
gen
0
51
部屋のワイシャツとカメラと私
gen
0
410
Interaction designer のお仕事
gen
0
83
Other Decks in Programming
See All in Programming
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
高速開発のためのコード整理術
sutetotanuki
1
390
今から始めるClaude Code超入門
448jp
8
8.5k
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
dchart: charts from deck markup
ajstarks
3
990
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
170
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
150
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
SourceGeneratorのススメ
htkym
0
190
Kotlin Multiplatform Meetup - Compose Multiplatform 외부 의존성 아키텍처 설계부터 운영까지
wisemuji
0
190
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.1k
組織で育むオブザーバビリティ
ryota_hnk
0
170
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
54
8k
Unsuck your backbone
ammeep
671
58k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
77
What does AI have to do with Human Rights?
axbom
PRO
0
2k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
9.5k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
410
Done Done
chrislema
186
16k
Odyssey Design
rkendrick25
PRO
1
490
Mind Mapping
helmedeiros
PRO
0
78
Typedesign – Prime Four
hannesfritz
42
2.9k
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