You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behaviour: every vector record stores its field_name
inline (u32 len + UTF-8 bytes). Most segments have one field; this
is pure overhead.
Why it might be a bottleneck: For 10 M vectors with a 32-byte
field name ("text_embedding_e5_large_v2_768d"), that's 320 MB of
duplicated UTF-8 alongside the int8 payload.
Reference precedent: Lucene stores field names in a per-segment
field-info dictionary (fnm) and references them by ordinal in every
vector record.
Current layout:
per record: [doc_id u64][name_len u32][field_name UTF-8][int8 dim][meta 8B]
Proposed layout:
segment header: field_dict_len u16, field_dict (u16 len + UTF-8)*
per record: [doc_id u64][field_id u16][int8 dim][meta 8B]
─ field_id indexes into the dictionary above ─
For the single-field case field_id can be elided entirely (encode
as field_dict_len = 0 → implicit field_id = 0).
Suggested direction: extend VectorSegmentHeader (or move to
LVS2) to carry the field dictionary; readers translate field_id back
to the string on first access (cached in a SmallVec<String> per
segment).
Risk / scope: format break (must bump LVS version); pairs with
the columnar restructure (Add parallel index #2).
ID: VI-15 — see ~/.claude/tasks/laurus/20260523_perf_round3_audit/task_list.md for the full Round-3 issue list.
Round-3 perf push sub-issue (tracked under umbrella #535).
[M] Tighten on-disk record by promoting
field_nameto a per-segment dictionaryWhere:
laurus/src/vector/index/quantized_io.rs:14-23,:74-85; HNSW write loop (hnsw/writer.rs:1210-1218); Flat / IVFequivalents.
Current behaviour: every vector record stores its
field_nameinline (
u32 len + UTF-8 bytes). Most segments have one field; thisis pure overhead.
Why it might be a bottleneck: For 10 M vectors with a 32-byte
field name (
"text_embedding_e5_large_v2_768d"), that's 320 MB ofduplicated UTF-8 alongside the int8 payload.
Reference precedent: Lucene stores field names in a per-segment
field-info dictionary (
fnm) and references them by ordinal in everyvector record.
Current layout:
Proposed layout:
For the single-field case
field_idcan be elided entirely (encodeas
field_dict_len = 0 → implicit field_id = 0).Suggested direction: extend
VectorSegmentHeader(or move toLVS2) to carry the field dictionary; readers translate field_id back
to the string on first access (cached in a
SmallVec<String>persegment).
Risk / scope: format break (must bump LVS version); pairs with
the columnar restructure (Add parallel index #2).
ID:
VI-15— see~/.claude/tasks/laurus/20260523_perf_round3_audit/task_list.mdfor the full Round-3 issue list.Task list (2026-07-12 start)
Phase 0: Investigation
Phase 1: Plan
Phase 2+: Implementation (sub-issues)