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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
【DroidKaigi 2026】「アクセシビリティを利用するとき、 アクセシビリティもまたこちらを利用している」 〜マルウェアによる攻撃と防衛について〜
halunoyo
0
460
20260828_品質と開発生産性を両立させる、AI時代のE2Eテストの考え方
magicpod
0
200
AWS Step Functions 大規模並列の壁を越える / jaws-sonic-2026-niigata-step-functions
kasacchiful
PRO
1
450
DroidKaigi 2026 「個人開発という実験場: Android エンジニアが手にする4つの自由」
slashnephy
0
230
Security issues being discussed on Web Platforms
petamoriken
0
880
自分的「カンファレンスの楽しみ方」
syumai
0
200
What We Talk About When We Talk About XP
m_seki
2
610
XP祭りでしか伝わらないフリップネタ #xpjug
murabayashi
0
150
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
6.7k
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
200
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
3
540
業務時間外もAIに働いてもらう話
colorful12
3
10k
Featured
See All Featured
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
880
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
How GitHub (no longer) Works
holman
316
150k
Designing Experiences People Love
moore
143
24k
Product Roadmaps are Hard
iamctodd
55
13k
Evolving SEO for Evolving Search Engines
ryanjones
0
290
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
540
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
500
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
520
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