-
Notifications
You must be signed in to change notification settings - Fork 699
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
Prefetch Improvement #2435
Prefetch Improvement #2435
Conversation
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.
In practice, this was shown to greatly improve concurrent prefetch performance (reads don't need to acquire the write lock on the cache like Put
).
I'm wondering if it would make sense to include this optimization directly in the cache vs here or if this is considered non-standard usage/optimization? @StephenButtolph
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.
I'm not sure we can directly include this into the cache because the cache would then need to somehow check if the provided value is equal. We could do that just directly with ==
, but I feel like if we wanted to do that then we would want to make it more general.
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.
comment nit, otherwise lgtm
Co-authored-by: Dan Laine <[email protected]> Signed-off-by: David Boehm <[email protected]>
Improve Prefetch by not taking the cache write lock for items already present in the cache.