Address review comments

More efficient traversal of list to score.
This commit is contained in:
Martin Sumner 2020-03-29 20:02:21 +01:00
parent 28c88ef8b8
commit 9838e255d2
2 changed files with 17 additions and 11 deletions

View file

@ -464,7 +464,8 @@ mergefile_selector(Manifest, LevelIdx, {grooming, ScoringFun}) ->
Sample =
lists:usort(lists:foldl(SelectorFun, [], lists:seq(1, ?GROOM_SAMPLE))),
% Note that Entries may be less than GROOM_SAMPLE, if same one picked
% multiple times
% multiple times. Level cannot be empty, as otherwise a merge would not
% have been chosen at this level
ScoringFun(Sample).