Skip to content

Reduce D1 reads for news pages - #39

Merged
sametbasbug merged 2 commits into
mainfrom
equinox/d1-read-optimization
Sep 1, 2026
Merged

sametbasbug merged 2 commits into
mainfrom
equinox/d1-read-optimization

Conversation

@sametbasbug

Copy link
Copy Markdown
Owner

Özet

  • tekil haberlerde tüm arşivi okumak yerine hedefli D1 sorguları kullanır
  • ana sayfa ve arşivi limit/offset/category sorgularına geçirir
  • sitemap/RSS yollarında gereksiz tag/source okumalarını kaldırır
  • eş zamanlı yayınlarda deterministik sıralama sağlar
  • parity aracında Cloudflare SSR vendor-prefix farkını belgeli biçimde normalize eder
  • eski 4225 satır/istek cache yorumunu yeni mimariye göre günceller

Doğrulama

  • 587/587 static ↔ D1 SSR page parity
  • newsroom: 212 test geçti
  • Orbit testleri geçti
  • npm run typecheck geçti
  • npm run build geçti
  • npm run build:ssr geçti

Gerçek 580 haberlik arşiv yerel D1'e kopyalanarak parity testi gerçek veri ölçeğinde çalıştırıldı; remote D1 test sırasında değiştirilmedi.

Replace full-archive D1 reads with targeted article, pagination, category, and sitemap queries. Preserve static/SSR parity with deterministic ordering and update parity/cache documentation. Verified with 587/587 page parity, 212 newsroom tests, Orbit tests, typecheck, static build, and SSR build.
CI caught that the article template still uses normalizeNewsCategory later in the file. Restore the import and verify typecheck plus full static build.
@sametbasbug
sametbasbug merged commit d7cc961 into main Sep 1, 2026
5 checks passed
@sametbasbug
sametbasbug deleted the equinox/d1-read-optimization branch September 1, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant