Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Query DB: measure repeated legacy-owner key parsing

未關閉
#2,181 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
22/100
Issue 類型
重構
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
typescript

研究方向

Start in packages/query-db-collection/src/query.ts at getLegacyOwnerHashes, where candidates are built from persisted owner hashes and retention markers and JSON-parsed per eligible equality demand. Write a benchmark that varies owner count, demand count and marker count to measure parsing cost. Done means a measured result showing whether an index built once per metadata generation is worth it, with the static-key prefix and markerless-owner migration checks still passing.

由索引模型根據 Issue 內容生成。

描述

Observation

PR #2134 performs one persisted-row metadata scan per sync run, but getLegacyOwnerHashes then builds a candidate set from every persisted owner hash and every retention marker and JSON-parses candidates for each eligible equality demand (packages/query-db-collection/src/query.ts). This gives repeated work proportional to demands × (owners + markers), including fresh installs with no historical alias. The current oracle bounds scan count but not this parsing work.

This is a source-level performance concern; no user latency regression has been measured. Keep the correctness repair in #2134 focused.

Follow-up

Measure load cost across increasing owner and demand counts, including marker-heavy storage. If material, build the normalized historical-key index once per relevant metadata generation, with explicit updates when owners or markers change. Preserve the current static-key prefix and full-demand checks and the markerless-owner migration witness.

主要語言
TypeScript
星號
4k
分支
277
平均合併
1 天 2 小時
30 天內合併 PR
213

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

TanStack/db 的其他 Issue

查看 TanStack/db 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。