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

Batch account location lookups for sparse ledger #14522

Merged
merged 6 commits into from
Dec 5, 2023

Conversation

mrmr1993
Copy link
Member

@mrmr1993 mrmr1993 commented Nov 6, 2023

This PR builds upon #14520. This adds batching for the location lookups in the sparse ledger conversion function.

Checklist:

  • Dependency versions are unchanged
    • Notify Velocity team if dependencies must change in CI
  • Modified the current draft of release notes with details on what is completed or incomplete within this project
  • Document code purpose, how to use it
    • Mention expected invariants, implicit constraints
  • Tests were added for the new behavior
    • Document test purpose, significance of failures
    • Test names should reflect their purpose
  • All tests pass (CI will check this if you didn't)
  • Serialized types are in stable-versioned modules
  • Does this close issues? List them

@mrmr1993
Copy link
Member Author

mrmr1993 commented Nov 6, 2023

!ci-build-me

@mrmr1993
Copy link
Member Author

mrmr1993 commented Nov 6, 2023

!ci-nightly-me

@mrmr1993
Copy link
Member Author

mrmr1993 commented Nov 8, 2023

!ci-build-me

@mrmr1993
Copy link
Member Author

mrmr1993 commented Nov 8, 2023

!ci-nightly-me

Either.first (account_id, Some location)
| None ->
Either.second account_id )
let account_ids_with_locations_rev, leftover_account_ids_rev =
Copy link
Member

Choose a reason for hiding this comment

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

I suggest using the version

Copy link
Member

Choose a reason for hiding this comment

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

I took your version, with some minor modifications (your version was reversing the resulting list, and had a some misnomers about the parent always being a database).

@mrmr1993 mrmr1993 marked this pull request as ready for review November 21, 2023 18:19
@mrmr1993 mrmr1993 requested a review from a team as a code owner November 21, 2023 18:19
@nholland94
Copy link
Member

!ci-build-me

Copy link
Contributor

@Sventimir Sventimir left a comment

Choose a reason for hiding this comment

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

I'm a little bit concerned about performance of self_find_or_batch_lookup. Does the performance gain of batch lookup justify going over the list of identifiers 3 times here? Is preserving the order of identifiers important? If it's not, then this could be done a little faster.

@georgeee georgeee force-pushed the feature/batch-merkle-path-access branch from c3e8338 to 300c547 Compare November 27, 2023 15:32
@georgeee georgeee force-pushed the feature/batch-account-location-lookups branch from 187ec15 to c45bc86 Compare November 27, 2023 15:39
Base automatically changed from feature/batch-merkle-path-access to rampup November 28, 2023 01:13
@deepthiskumar
Copy link
Member

!ci-build-me

@georgeee georgeee force-pushed the feature/batch-account-location-lookups branch from 4123438 to b992841 Compare November 28, 2023 17:18
@georgeee
Copy link
Member

!ci-build-me

@georgeee georgeee force-pushed the feature/batch-account-location-lookups branch from b992841 to f8c7017 Compare November 28, 2023 20:04
@georgeee
Copy link
Member

!ci-build-me

@nholland94
Copy link
Member

I'm a little bit concerned about performance of self_find_or_batch_lookup. Does the performance gain of batch lookup justify going over the list of identifiers 3 times here? Is preserving the order of identifiers important? If it's not, then this could be done a little faster.

@Sventimir What's your performance concern exactly? The operation is O(n). Are you concerned about garbage collection pressure from the intermediate tuples?

@deepthiskumar
Copy link
Member

!ci-build-me

@deepthiskumar
Copy link
Member

!ci-nightly-me

@deepthiskumar
Copy link
Member

!ci-nightly-me

@deepthiskumar
Copy link
Member

@deepthiskumar deepthiskumar merged commit a882073 into rampup Dec 5, 2023
2 checks passed
@deepthiskumar deepthiskumar deleted the feature/batch-account-location-lookups branch December 5, 2023 00:19
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.

6 participants