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
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
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.2k
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
490
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
990
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
110
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
5.1k
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
3
2.2k
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
170
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
170
ActionController meets Protocol Buffers
sorah
0
360
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
210
Featured
See All Featured
Designing for Performance
lara
612
70k
Leo the Paperboy
mayatellez
10
2.4k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
430
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
560
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
740
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
750
Game over? The fight for quality and originality in the time of robots
wayneb77
1
300
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
600
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