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

replace account index bulk insert with iterator #18198

Merged
merged 1 commit into from
Jun 25, 2021

Conversation

jeffwashington
Copy link
Contributor

@jeffwashington jeffwashington commented Jun 24, 2021

Problem

Account index creation is slow. Account index takes a lot of memory. During startup, there is contention for memory. Soon, the bulk accounts to be inserted will be sorted and binned inside accounts index. This work is preparation for binning account data.

Summary of Changes

During bulk creation of account index, accept an iterator instead of requiring a vector. This allows lazy evaluation and prevents having to create vectors of data that will be resorted anyway.
Fixes #

@jeffwashington jeffwashington changed the title Excess43 replace account index bulk insert with iterator Jun 24, 2021
@jeffwashington jeffwashington force-pushed the excess43 branch 2 times, most recently from fa06b1f to a2f51f9 Compare June 25, 2021 13:45
@codecov
Copy link

codecov bot commented Jun 25, 2021

Codecov Report

Merging #18198 (5337540) into master (f2a2581) will increase coverage by 0.0%.
The diff coverage is 100.0%.

@@           Coverage Diff           @@
##           master   #18198   +/-   ##
=======================================
  Coverage    82.3%    82.3%           
=======================================
  Files         433      433           
  Lines      120940   120946    +6     
=======================================
+ Hits        99588    99615   +27     
+ Misses      21352    21331   -21     

Copy link
Member

@sakridge sakridge left a comment

Choose a reason for hiding this comment

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

lgtm

@jeffwashington jeffwashington merged commit e063766 into solana-labs:master Jun 25, 2021
mergify bot pushed a commit that referenced this pull request Jun 25, 2021
jeffwashington added a commit that referenced this pull request Jun 25, 2021
(cherry picked from commit e063766)

Co-authored-by: Jeff Washington (jwash) <[email protected]>
@brooksprumo brooksprumo mentioned this pull request Aug 23, 2021
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