Skip to content

perf(vector/search): vector_ids() clones full Vec<(u64, String)> per call #672

Description

@mosuka

Round-3 perf push sub-issue (tracked under umbrella #536).

[S] vector_ids() clones full Vec<(u64, String)> per call

  • Where: laurus/src/vector/index/hnsw/reader.rs:560-562Ok(self.vector_ids.clone()).
    Used in hnsw/searcher.rs:206 (unfiltered brute fallback) and elsewhere.
  • Current behavior: 10 M × 32 B ≈ 320 MB per call. Unconditional.
  • Suggested direction: Return Arc<[(u64, String)]> or refactor to iterator. Already
    done for doc_ids_for_field (perf(vector): cache vector_ids per field at reader load #405).
  • Risk / scope: Small.

ID: VS-29 — see ~/.claude/tasks/laurus/20260523_perf_round3_audit/task_list.md for the full Round-3 issue list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions