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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Gen
March 24, 2017
Programming
29
0
Share
Optimizing Contents Delivery
Gen
March 24, 2017
More Decks by Gen
See All by Gen
VRT
gen
0
15
Introduction to WebRTC
gen
0
240
Introduction to ECS
gen
0
40
Introduction to multiplayer netcode
gen
0
82
Introduction to WebGL
gen
0
51
部屋のワイシャツとカメラと私
gen
0
410
Interaction designer のお仕事
gen
0
84
Other Decks in Programming
See All in Programming
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
1
240
安いハードウェアでVulkan
fadis
1
890
Kubernetes上でAgentを動かすための最新動向と押さえるべき概念まとめ
sotamaki0421
1
370
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
260
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
340
Java 21/25 Virtual Threads 소개
debop
0
320
SkillがSkillを生む:QA観点出しを自動化した
sontixyou
4
2.4k
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
820
Kubernetesでセルフホストが簡単なNewSQLを求めて / Seeking a NewSQL Database That's Simple to Self-Host on Kubernetes
nnaka2992
0
200
Goの型安全性で実現する複数プロダクトの権限管理
ishikawa_pro
2
1.4k
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
550
モックわからないマン卒業記 ~振る舞いを起点に見直した、フロントエンドテストにおけるモックの使いどころ~
tasukuwatanabe
3
440
Featured
See All Featured
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
160
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
150
Git: the NoSQL Database
bkeepers
PRO
432
67k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Speed Design
sergeychernyshev
33
1.6k
Music & Morning Musume
bryan
47
7.1k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
500
For a Future-Friendly Web
brad_frost
183
10k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
330
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
450
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