Skip to content

avoid redundant recomputation of fee histogram bins#971

Merged
romanz merged 2 commits intoromanz:masterfrom
conduition:fee-histogram-perf
Dec 11, 2023
Merged

avoid redundant recomputation of fee histogram bins#971
romanz merged 2 commits intoromanz:masterfrom
conduition:fee-histogram-perf

Conversation

@conduition
Copy link
Contributor

Extracted from #970. This PR is a prereq of #970.

FeeHistogram was being recomputed from scratch on every call to Mempool::sync. This was unnecessary. Instead we can mutate the existing histogram bin state once on each new transaction added to or removed from the mempool.

Prometheus mempool metrics are only updated once per bin at the end of every sync.

FeeHistogram was being recomputed from scratch on every
mempool.sync call. This was unnecessary. Instead we can
mutate the existing histogram state for each new
transaction added or removed from the mempool.
@romanz romanz merged commit c228115 into romanz:master Dec 11, 2023
Copy link
Owner

@romanz romanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@conduition conduition deleted the fee-histogram-perf branch December 12, 2023 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants