Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove value_node_db batch #2922

Merged
merged 23 commits into from Apr 8, 2024
Merged

Remove value_node_db batch #2922

merged 23 commits into from Apr 8, 2024

Conversation

StephenButtolph
Copy link
Contributor

Why this should be merged

We currently allocate a valueNodeBatch.ops map for no reason. This removes this unused map.

Seems to provide as much as a ~22% speedup (using memdb).

Before:

BenchmarkCommitView/apply_and_commit_changes-12         	     561	   2142773 ns/op	  583440 B/op	    4920 allocs/op

After:

BenchmarkCommitView/apply_and_commit_changes-12         	     685	   1673874 ns/op	  438132 B/op	    4904 allocs/op

How this works

Removes valueNodeBatch and uses the baseDB.Batch instead.

How this was tested

  • Added benchmark
  • CI

@StephenButtolph StephenButtolph added cleanup Code quality improvement merkledb labels Apr 7, 2024
@StephenButtolph StephenButtolph added this to the v1.11.4 milestone Apr 7, 2024
@StephenButtolph StephenButtolph self-assigned this Apr 7, 2024
Base automatically changed from cleanup-commit-to-db to master April 8, 2024 20:27
@StephenButtolph StephenButtolph added this pull request to the merge queue Apr 8, 2024
Merged via the queue into master with commit 5d76351 Apr 8, 2024
17 checks passed
@StephenButtolph StephenButtolph deleted the optimize-commit-view branch April 8, 2024 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code quality improvement merkledb
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants