Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Kill Pollingした話
Search
sutiwo
July 21, 2017
Programming
1
1.6k
Kill Pollingした話
sutiwo
July 21, 2017
Tweet
Share
More Decks by sutiwo
See All by sutiwo
攻めつづける FRESH! のWeb ver.新春
sutiwo
3
5.2k
FRESH! クライアントサイドパフォーマンス改善
sutiwo
1
2.4k
Other Decks in Programming
See All in Programming
ハイパーメディア駆動アプリケーションとIslandアーキテクチャ: htmxによるWebアプリケーション開発と動的UIの局所的適用
nowaki28
0
430
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
yasunacoffee
0
150
S3 VectorsとStrands Agentsを利用したAgentic RAGシステムの構築
tosuri13
6
360
AIコーディングエージェント(NotebookLM)
kondai24
0
210
Claude Codeの「Compacting Conversation」を体感50%減! CLAUDE.md + 8 Skills で挑むコンテキスト管理術
kmurahama
1
560
生成AIを利用するだけでなく、投資できる組織へ
pospome
2
370
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
8
3.1k
Cap'n Webについて
yusukebe
0
140
ゆくKotlin くるRust
exoego
1
110
非同期処理の迷宮を抜ける: 初学者がつまづく構造的な原因
pd1xx
1
740
re:Invent 2025 のイケてるサービスを紹介する
maroon1st
0
140
MAP, Jigsaw, Code Golf 振り返り会 by 関東Kaggler会|Jigsaw 15th Solution
hasibirok0
0
260
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
527
40k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
1
860
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
160
Between Models and Reality
mayunak
0
150
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
21
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
320
Docker and Python
trallard
47
3.7k
Thoughts on Productivity
jonyablonski
73
5k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.1k
What's in a price? How to price your products and services
michaelherold
246
13k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
27
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Transcript
Kill Pollingͨ͠ 2017 7.21 Վب࠲.tech#13 ʮϑϩϯτΤϯυΞʔΩςΫνϟษڧձʯLT @su9wo
• su9wo / su9wo_ •CyberAgent, Inc. •ϑϩϯτΤϯδχΞ •FRESH! hKps:/ /freshlive.tv
•WebPush • hKps:/ /twiKer.com/FRESH_STAFF/status/887960571487764481 •Service Workerͷಋೖ • hKps:/ /developers.cyberagent.co.jp/blog/archives/6057/ •ΞΫηγϏϦςΟΨΠυϥΠϯʹج͍࣮ͮͨ
• hKps:/ /openfresh.github.io/a11y-guidelines/ ϑϩϯτνʔϜͰ࠷ۙͬͯΔ͜ͱ
Kill Polling͢Δཧ༝ • ଈ࣌ੑ͕ͳ͍ • ͍߹ΘͤܗࣜͳͷͰɺແବͳ௨৴ൃੜ • ͔ͬ͜ѱ͍
• ൪εςʔλεͷߋ৽ (։࢝์ૹதऴྃ) • ൪εςʔλεͷߋ৽ (ແྉ༗ྉ) • ࢹௌͷߋ৽ • ίϝϯτͷߋ৽
• ։࢝ɾऴྃ࣌ؒͷߋ৽ FRESH!ͰͷϢʔεέʔε
None
None
None
None
None
SSE (Server-Sent Events) • αʔό͔ΒΫϥΠΞϯτͷ୯Ұํ௨৴ • ςΩετͷΈ(όΠφϦbase64͢Δ) • IE11polyfill hKps:/
/github.com/Yaffle/EventSource/
Plasma • hKps:/ /github.com/openfresh/plasma • ΠϕϯτϓογϡͷϛυϧΣΞ • WebϒϥβSSE / ωΠςΟϒΞϓϦgRPC
• SSEʹΑͬͯαʔό͔ΒΠϕϯτΛड͚औΔ͜ͱ͕Ͱ͖Δ • ಙͷߴ͍ঁੑ༏͖Πϯλʔϯੜ࡞
ྲྀΕ • ॳظϨϯμϦϯά࣌ʹσʔλΛStoreʹอ࣋ • Plasmaଓ new EventSource(url, opts);ʹ.addEventListener(); • ߋ৽Λݕͨ͠ΒStoreͰJSON.parse,
Object.assignͰࠩΛ্ॻ͖ • ൪ऴྃޙߋ৽ͷඞཁ͕ͳ͘ͳͬͨΒ.removeEventListener();
σόοά • DevToolsͰΈΕ·͢
݁Ռ
ϙʔϦϯάͷϦΫΤετׂ߹ 0 % 7,5 % 15 % 22,5 % 30
% ϦϦʔεલ ϦϦʔε ϦϦʔεཌ ϦϦʔεཌʑ 0,85 % 1,43 % 21,15 % 27,8 %