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

Accumulator package: Use pointers, save repeated gets #5845

Closed
Tracked by #5191
ValarDragon opened this issue Jul 15, 2023 · 2 comments
Closed
Tracked by #5191

Accumulator package: Use pointers, save repeated gets #5845

ValarDragon opened this issue Jul 15, 2023 · 2 comments
Assignees

Comments

@ValarDragon
Copy link
Member

In the accumulator package, we do repeated gets in several locations. This is because we are not using pointers for the base of functions, so mutations are not getting tracked correctly.

We should make GetAccumulator return a pointer, and then we can save redundant state operations, such as right here: https://github.com/osmosis-labs/osmosis/blob/main/osmoutils/accum/accum.go#L151-L155

This should with execution time and gas costs.

@czarcas7ic
Copy link
Member

Changing status back to "In Progress" from "Done" since it appears the PR linked was only a component. Are you able to list out further components so we can get these knocked out?

@ValarDragon
Copy link
Member Author

Going to close for now! I'll make a new issue if I see more

@github-project-automation github-project-automation bot moved this from In Progress🏃 to Done ✅ in Osmosis Chain Development Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants