Skip to content

M2: Replace the O(N x budget) snapshot knapsack with top-k selection #36

Backlog

Description

@h45sh

Context

Snapshot selection uses an O(N x budget) knapsack. At 10k nodes it takes 17.4 s; at 50k it does not finish in 180 s.

Acceptance criteria

  • Replace the knapsack with top-k/heap selection.
  • p95 < 1 s at 100k nodes, budget 2,000.
  • Add a regression benchmark.

Out of scope

Changing the snapshot schema.

Part of #25

Activity

  1. added this to the M2 Scale milestone on Nov 29, 2026
  2. added
    type:task
    area:graph
    priority:P0
    on Nov 29, 2026
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:graphpriority:P0type:task

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions