Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
RemixアプリをCloudflare PagesにデプロイしたらTTFBが3,800msになった😥
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
saneatsu
November 24, 2024
Programming
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
RemixアプリをCloudflare PagesにデプロイしたらTTFBが3,800msになった😥
結論(追記)に書いたZennのURLは以下です。
https://zenn.dev/saneatsu/articles/remix-cloudflare-ttfb-improvement
saneatsu
November 24, 2024
Other Decks in Programming
See All in Programming
仕様駆動開発による爆速プロダクト開発 / Bakusoku Spec Driven Development
kobakei
0
120
WebMCP Challenge に星空観察アプリで参加した話
okajun35
0
190
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
490
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
650
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
2.9k
速習iPhone Duo対応
yuukiw00w
1
710
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
0
1.7k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
240
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
170
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
3.1k
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
8k
setup-vp GitLab対応の裏側
naokihaba
0
120
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
510
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
700
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
530
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Ruling the World: When Life Gets Gamed
codingconduct
0
350
Rails Girls Zürich Keynote
gr2m
96
14k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
550
How to build a perfect <img>
jonoalderson
1
6k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
230
Transcript
RemixアプリをCloudflare Pagesに デプロイしたらTTFBが3,800ms になった
アジェンダ 1. 自己紹介 2. 対象となるアプリケーション 3. 発生している問題 4. 計測用ページの作成 5.
結果 6. 考えられる原因 7. 結論(追記)
自己紹介 若菜実農(さねあつ) @saneatsu Algoageという会社でフロントエンドエンジニアをしています DMM チャットブーストCVというLINEを使ったチャットボットを提供して います 会社ではNext.jsとReact Flowを使って社内向けプロダクトを開発して います
対象となるアプリケーション 概要 趣味で作っているキュレーションサイトみたいなもの ZennのScraps に開発記録を書いています 技術スタック Remix Cloudflare Pages shadcn/ui(Radix
+ Tailwind CSS) Prisma Turso
発生している問題 TTFBが3,800msかかっている 推奨値は3G回線で600ms ページ内遷移の場合も訪れたことないページだと3,000msくらいかかってしまう 1回行ったことあるページの場合は早い
計測用ページの作成 リポジトリ: saneatsu/remix-on-cf-pages URL: https://remix-on-cf-pages.pages.dev/ 計測用のページ 1. JSON Placeholderを使ってTodoを200件取得するページ 2.
JSON Placeholderを使ってTodoを1,000件取得するページ 3. DB(Turso)の2つのテーブルから5件ずつ、計10件のデータを取得するページ ゼロからRemix x Cloudflare Pagesのアプリを作って、以下3つのページで計測する。
結果 URL TTFB /json-placeholder-200 240 - 430 ms /json-placeholder-1000 500
- 600 ms /db-connect 1970 - 2310 ms Lighthouseによる計測結果(各ページ3回測定) 。
考えられる原因 Cloudflareの設定? 初回のアクセスだからCloudflareのキャッシュの設定ではないはず TursoのCold start? Tursoは無料プランだとCold startが発生する ということで月9ドルの有料プランにしてみたが計測結果が変わらなかった
結論(追記) 結論、原因はORMとしてPrismaを使用していることで、Drizzleに移行することで問題を回避できました 詳細は以下の記事にまとめました Cloudflare Pages(Workers)でPrismaを使うとサーバーからデータを取得するのに時間がかかってしまう | Zenn