Skip to content

Pyramid build cache can be slower than cold build at high hit rates #2898

Description

@LHT129

Problem\n\nPyramid warm builds can remain slower than cold builds even when the imported build cache has a 99% hit rate. The current cache path restores cached graph rows and then refines every cache-hit graph membership with a reduced construction budget. On large single-layer root graphs this retains near-full graph construction work, and cache restoration also performs repeated source-ID string translation.\n\n## Expected behavior\n\nFor compatible single-layer NSW graph nodes, fully restored cache-hit rows should be reused directly while only cache misses are constructed. Multi-layer routing overlays must still be rebuilt because route graphs are not included in the cache payload.\n\n## Reproduction\n\nA production-like benchmark with 1M 768-dimensional vectors, compressed Pyramid graphs, RaBitQ base quantization, SQ8 reorder, and 99% source-ID overlap shows the warm build receiving little or negative acceleration before this optimization.\n\n## Scope\n\n- avoid refining complete single-layer cache hits\n- restore cached rows via old-to-new inner-ID mapping\n- parallelize row decoding while committing graph writes deterministically\n- retain routing reconstruction for multi-layer nodes\n- add cache membership and restored-edge diagnostics\n

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/ciCI/CD, build configuration, and automation CI/CD、构建配置与自动化kind/improvementOptimizations, UX polish, or minor improvements 性能优化、体验打磨或细节改良module/indexIndex algorithms and implementations 索引算法与实现needs-triageNeeds kind and version triagepts/8Large effort; cross-component work or uncertainty 大工作量;跨组件或存在明显不确定性

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions