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

improve(relayer): Defer deposit version computation #1847

Merged
merged 3 commits into from
Oct 4, 2024
Merged

Conversation

pxrl
Copy link
Contributor

@pxrl pxrl commented Oct 2, 2024

getUnfilledDeposits() currently unconditionally computes the deposit version (i.e. the ConfigStore VERSION value applicable at the deposit quoteTimestamp), and then filters out all the deposits that have been filled. Determining the relevant version implies a lot of Array.find() calls, all of which is wasted when the object is subsequently discarded.

getUnfilledDeposits() currently unconditionally computes the deposit
version (i.e. the ConfigStore VERSION value applicable at the deposit
quoteTimestamp), and then filters out all the deposits that have been
filled. Determining the relevant version implies a lot of Array.find()
calls, all of which is wasted when the object is subsequently discarded.
@pxrl pxrl requested a review from bmzig October 2, 2024 14:54
Copy link
Member

@nicholaspai nicholaspai left a comment

Choose a reason for hiding this comment

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

LGTM

@pxrl pxrl merged commit 47c156f into master Oct 4, 2024
4 checks passed
@pxrl pxrl deleted the pxrl/deferVersion branch October 4, 2024 10:09
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.

2 participants