luceneutil icon indicating copy to clipboard operation
luceneutil copied to clipboard

Demonstrate ordinal map building on refresh

Open stefanvodita opened this issue 2 years ago • 1 comments

We're considering building ordinal maps eagerly. This can already be done to some extent using the current API. This PR shows how that should be done.

I'm don't know if the change is worth committing as is. The reader states that we compute are unused and there's no useful performance data we would be getting.

Testing: python3 src/python/localrun.py -source wikimedium10k -facets -nrt

stefanvodita avatar Nov 15 '22 17:11 stefanvodita

Thank you for the review @mikemccand! I abandoned the idea of showing reader states computed on refresh, since there’s not a good place to showcase that in the benchmarks. Instead, I made a change to IndexState to pre-compute reader states that will be used lated by SearchPerfTest.

stefanvodita avatar Dec 04 '22 12:12 stefanvodita

Hi @mikemccand! I came across this old PR again. I think what we're doing here makes sense. We precompute reader states, which will be stored in IndexState.ssdvFacetStates, and retrieved later in SearchPerfTest. Right now, when running the benchmarks, we're measuring the time we spend building those reader states, because we do it lazily.

Which do you prefer, loading the reader states eagerly (this PR) or lazily (existing functionality)?

stefanvodita avatar Apr 10 '24 08:04 stefanvodita

Which do you prefer, loading the reader states eagerly (this PR) or lazily (existing functionality)?

+1 to do it eagerly (this PR) -- thank you! The change looks good -- since you are now a Lucene committer, I'll add you as collaborator here and then you can merge it? Yay :) Thank you!

mikemccand avatar Apr 10 '24 14:04 mikemccand

Thank you, merged!

stefanvodita avatar Apr 10 '24 15:04 stefanvodita