Evaluate OPFS-backed binary persistence for the vector index (float32 layout instead of serialized IDB objects)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- performance, web-dev
調査の方向性
Start with src/lib/search/vector-store.ts and src/lib/search/search-worker.ts, then run vector-store.bench.test.ts using vitest.bench.config.ts to establish the IndexedDB baseline. Evaluate OPFS sync access handles and the existing incremental re-embed path without removing the IndexedDB fallback. The evaluation is done when benchmark evidence and browser-support findings are recorded as an ADR under plans/ADRs/; implementation is only warranted if the issue’s “clears the bar” criterion is made explicit.
索引モデルが issue の本文から書いたものです。
説明
Summary
The semantic vector index persists in IndexedDB (src/lib/search/vector-store.ts:11). IndexedDB serializes every entry through structured clone, which is expensive for large float arrays. The 2026 local-first pattern for this exact access shape — "one enormous opaque payload, accessed positionally" — is a contiguous Float32Array packed into a single binary file in OPFS (navigator.storage.getDirectory()), read/written positionally by the search worker with sync access handles, and rebuilt incrementally from the existing content-hash digests.
Evidence
src/lib/search/vector-store.ts— IndexedDB persistence behind model/preprocessing/corpus fingerprints.src/lib/search/semantic-digest.ts,vector-store-incremental.test.ts— incremental re-embed machinery already exists, which is the prerequisite for an append-friendly binary layout.- The search worker (
src/lib/search/search-worker.ts) is the right thread for OPFS sync access handles.
Impact
- Memory + startup: no structured-clone deserialization of thousands of vectors at boot; a single mmap-able-style buffer scan.
- Query latency: single-pass dot-product over a contiguous buffer beats per-entry IDB reads, especially at the corpus sizes the semantic budget (
semantic-budget.ts) allows. - Caveats to weigh: OPFS-in-worker browser support matrix; the current IDB path must remain the fallback; eviction semantics are shared with the corpus quota (pairs with the
navigator.storage.persist()work).
Proposed approach
- Spike: measure current load time and memory for a representative corpus (the bench harness
vitest.bench.config.ts+vector-store.bench.test.tsgives the baseline tooling). - If it clears the bar, implement a dual-mode store (OPFS primary, IDB fallback) behind the existing
vector-storeinterface; extend fingerprinting to cover the layout version. - Record the decision as an ADR in
plans/ADRs/per repo workflow. - Only pursue after the
navigator.storage.persist()issue lands so eviction semantics are controlled.
References
- OPFS vs IndexedDB for large binary data (2026): https://anirone.com/blog/general/opfs-vs-indexeddb-binary-storage
- Client-side RAG with OPFS-packed embeddings (2026 pattern): https://dev.to/codingcatdev/zero-backend-client-side-rag-in-the-browser-with-webgpu-transformersjs-mediapipe-and-opfs-245g
- MDN Origin Private File System: https://developer.mozilla.org/en-US/docs/Web/API/File_System_API/Origin_private_file_system
- 主要言語
- TypeScript
- スター
- 3
- フォーク
- 2
- 平均マージ
- 11時間 49分
- マージ済み PR(30日)
- 102
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
d-oit/do-knowledge-studio のほかの issue
-
Migrate do-harness.toml to the current [[sensors]] schema (do-harness CLI 0.6.0 cannot parse it)オープンchore config priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
d-oit/do-knowledge-studio#1219 ·
メンテナーはふだん 1 日以内に返信
-
Dependabot only scans the root manifest — add workspace packages/* directories, cooldown, and grouped updates対応中かも @d-oit が今日担当しました。 オープンci config deps priority: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
d-oit/do-knowledge-studio#1212 ·
メンテナーはふだん 1 日以内に返信
-
documentation priority: low
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
d-oit/do-knowledge-studio#1218 ·
メンテナーはふだん 1 日以内に返信
-
chore priority: low skills
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
d-oit/do-knowledge-studio#1217 ·
メンテナーはふだん 1 日以内に返信
-
ai-agent enhancement feature priority: low
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
d-oit/do-knowledge-studio#1215 ·
メンテナーはふだん 1 日以内に返信
d-oit/do-knowledge-studio の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
danielmiessler/LifeOS#3028 ·
メンテナーはふだん 5 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
iOS: last line of a long UITextView text is sometimes not drawn (frame a fraction of a point short)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
Koenkk/zigbee2mqtt#33855 ·
メンテナーはふだん 1 日以内に返信