Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

prevent excess allocation with AccountsIndexIterator #18605

Merged
merged 1 commit into from
Jul 13, 2021

Conversation

jeffwashington
Copy link
Contributor

@jeffwashington jeffwashington commented Jul 12, 2021

Problem

accounts index iteration only wants ITER_BATCH_SIZE items. After previous refactorings, we could unnecessarily prepare many more items than required.

Summary of Changes

Only accumulate ITER_BATCH_SIZE items.
Fixes #

@jeffwashington jeffwashington requested a review from sakridge July 12, 2021 16:17
@jeffwashington jeffwashington marked this pull request as ready for review July 12, 2021 16:17
@codecov
Copy link

codecov bot commented Jul 12, 2021

Codecov Report

Merging #18605 (4e5b89e) into master (12aa238) will decrease coverage by 0.0%.
The diff coverage is 100.0%.

@@            Coverage Diff            @@
##           master   #18605     +/-   ##
=========================================
- Coverage    82.7%    82.7%   -0.1%     
=========================================
  Files         440      440             
  Lines      123885   123886      +1     
=========================================
- Hits       102558   102509     -49     
- Misses      21327    21377     +50     

@jeffwashington jeffwashington merged commit 0bd8710 into solana-labs:master Jul 13, 2021
mergify bot pushed a commit that referenced this pull request Jul 13, 2021
jeffwashington added a commit that referenced this pull request Jul 15, 2021
jeffwashington added a commit that referenced this pull request Jul 19, 2021
mergify bot added a commit that referenced this pull request Jul 19, 2021
(cherry picked from commit 0bd8710)

Co-authored-by: Jeff Washington (jwash) <75863576+jeffwashington@users.noreply.github.com>
@brooksprumo brooksprumo mentioned this pull request Aug 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants