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

Speedup TWAP pruning logic (backport #7415) #7423

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Feb 6, 2024

This is an automatic backport of pull request #7415 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

Previously we were unmarshalling the value of all records we prune,
and paying lots of time in re-formatting keys.

Instead we can gather all the data we need from the key we iterate over
(and save us expensive unmarshals - .3s to .5s depending on GC).
We also skip one key formatting, since thats the representation we
are already iterating over (.12s to .21s depending on GC).
We skip time formatting in the second key format (30ms AKA .03s)
We could save more in the second key formatting w/ more code complexity.

I'd estimate we're adding .05s of overhead, which we should measure.

The net change of this should be between .42s to .72s off of epoch,
and be state compatible.

(cherry picked from commit c5313af)
@github-actions github-actions bot added the C:x/twap Changes to the twap module label Feb 6, 2024
@ValarDragon ValarDragon merged commit 9693eb7 into v22.x Feb 6, 2024
1 check passed
@ValarDragon ValarDragon deleted the mergify/bp/v22.x/pr-7415 branch February 6, 2024 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:x/twap Changes to the twap module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant