Skip to content

perf: index core commitments by creation bucket#527

Closed
dangelo352 wants to merge 1 commit into
Commitlabs-Org:masterfrom
dangelo352:perf/core-time-bucket-index-497
Closed

perf: index core commitments by creation bucket#527
dangelo352 wants to merge 1 commit into
Commitlabs-Org:masterfrom
dangelo352:perf/core-time-bucket-index-497

Conversation

@dangelo352

Copy link
Copy Markdown

Summary

  • add UTC-day creation buckets for commitment_core range queries
  • update create_commitment to populate the bucket index while preserving AllCommitmentIds
  • make get_commitments_created_between read indexed buckets instead of scanning every commitment
  • add boundary, empty/reversed range, multi-bucket, and full-scan equivalence coverage
  • record the before/after cost shape in benchmarks/results

Fixes #497.

Tests

  • CARGO_TARGET_DIR=/tmp/commitlabs-core-bucket-target cargo test -p commitment_core test_create_commitment_updates_storage_layout -- --nocapture
  • CARGO_TARGET_DIR=/tmp/commitlabs-core-bucket-target cargo test -p commitment_core get_commitments_created_between -- --nocapture
  • git diff --check

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.

Optimize commitment_core::get_commitments_created_between to avoid scanning AllCommitmentIds

2 participants