Skip to content

Prebuild and slim the dependency planner - #257

Open
smcio wants to merge 1 commit into
alpenglow-devfrom
smcio/dep-planner-optimisations
Open

Prebuild and slim the dependency planner#257
smcio wants to merge 1 commit into
alpenglow-devfrom
smcio/dep-planner-optimisations

Conversation

@smcio

@smcio smcio commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

the dependency planner currently clones tx’s unnecessarily and builds the conflict graph synchronously inside the transaction handling pipeline. this was improved by:

  • replace full transaction cloning with compact, deduplicated planner account snapshots
  • prebuild dependency plans alongside account loading and join only when TxLoop needs the result
  • use a transitive-reduced graph and compact CSR representation to reduce work and allocations
  • handle unresolved address-table metadata conservatively while retaining the Lightbringer fallback
  • fix fallback batch tracking so later conflicting accesses cannot be scheduled into an earlier batch
  • add planner preparation/build/wait/dispatch metrics, viewer support, regression tests, fuzz coverage, and benchmarks

Results:

  • SlotReplay: 18.186 ms → 17.309 ms (4.8% lower)
  • non-empty replay cost: 17.633 µs/tx → 16.434 µs/tx (6.8% lower)
  • DependencyPlannerBuild: 0.851 ms → 0.220 ms (74.1% lower)
  • TxLoop: 2.119 ms → 1.235 ms (41.7% lower)

@smcio
smcio marked this pull request as ready for review July 26, 2026 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant