docs(perf): 온디바이스 쿼리 프로파일러 설계 스펙 (LOC-65)#69
Merged
Conversation
Brainstorming output for a real-device RAG query-latency profiler.
Approach C (phased): coarse Dart-only baseline (no Rust change) then drill
into the dominant bucket. Grounded in verified architecture facts:
one-active-collection singleton, collection-switch rebuilds BM25 (full
re-tokenize, no disk persist) + reloads HNSW from disk (Box::leak), active
collection has zero per-query BM25 tokenization (0.18.4), filtered search
routes to the i8 exact-scan kernel.
Adds docs/perf/ondevice-query-profiler/{DESIGN.md,README.md}. Mirrors the
vector-math-refactor journal pattern; Linear project + LOC-65 created.
PR-sized decomposition (P1-P5, LOC-66..70) with TDD steps and verified Dart/Rust signatures. Phase 1 fully specified (host-TDD utils + device integration_test in the example app, 2 lanes, 3 cold/warm scenarios incl. A->B->A switch, JSON/CSV export); Phase 2 gated on baseline data. Mirrors vector-math-refactor journal; Linear LOC-66..70 created.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
무엇 / 왜 (설계 스펙, 문서 only)
실기에서 쿼리 단계별 지연을 분해해 진짜 병목을 찾기 위한 프로파일러 설계. 브레인스토밍 + 설계 리뷰 반영 산출물.
핵심 (리뷰 반영 후 확정)
검증된 전제 (코드 인용)
One-Active-Collection 싱글톤 / 스위치 시 BM25 전체 재토큰화(디스크 영속 X) + HNSW 디스크 재로드(Box::leak) / 활성 컬렉션 내 쿼리는 BM25 재토큰화 0회(0.18.4) / filtered→i8 exact-scan. 설계리뷰의 'BM25가 search 안에 숨어 HNSW로 오인' 주장은 정정(activate는 별도 호출).
문서
docs/perf/ondevice-query-profiler/{DESIGN.md,README.md}. vector-math-refactor 저널 패턴 미러. Linear: 프로젝트 + LOC-65.다음
스펙 리뷰 후 writing-plans로 구현 계획 → PR 단위 분해. 머지는 본인(CI green 후).