This repository has been archived by the owner on Apr 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 81
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Kerollmops
suggested changes
May 24, 2022
Kerollmops
added
the
no breaking
The related changes are not breaking (DB nor API)
label
May 24, 2022
Kerollmops
suggested changes
May 24, 2022
Kerollmops
reviewed
May 24, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please run the search benchmarks on this branch? This way we will see the changes!
|
Kerollmops
approved these changes
May 30, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much! Perfs are kind of back!
bors merge
Build succeeded: |
irevoire
added
the
performance
Related to the performance in term of search/indexation speed or RAM/CPU/Disk consumption
label
Jul 5, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
no breaking
The related changes are not breaking (DB nor API)
performance
Related to the performance in term of search/indexation speed or RAM/CPU/Disk consumption
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR make
exact_words
return anOption
instead of an empty set, since set creation is costly, as noticed by @Kerollmops.I was not convinces that this was the cause for all of the performance drop we measured, and then realized that methods that initialized it were called recursively which caused initialization times to add up. While the first fix solves the issue when not using exact words, using exact word remained way more expensive that it should be. To address this issue, the exact words are cached into the
Context
, so they are only initialized once.