Skip to content
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

[core] Implement get or create for lru cache #50347

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dentiny
Copy link
Contributor

@dentiny dentiny commented Feb 8, 2025

This PR implements a TODO item on GetOrCreate feature for LRU cache (which is suggested by @dayshah before), and apply it to core worker.

The reason to revisit it here is, I found large number of task creation at the beginning meanwhile at roughly the same time leads to unnecessary repeated computation.
But overall this PR is not intended to be an optimization latency wise, just to save possible recomputation.

Performance impact based on many_tasks test:

@dentiny dentiny force-pushed the hjiang/get-or-create-lru branch from 839a964 to d73db67 Compare February 8, 2025 08:05
@dentiny dentiny added the go add ONLY when ready to merge, run all tests label Feb 8, 2025
@dentiny dentiny requested review from jjyao, edoakes and dayshah February 8, 2025 19:39
Signed-off-by: dentiny <[email protected]>
@dentiny dentiny changed the title get or create for lru cache [core] Implement get or create for lru cache Feb 8, 2025
@jjyao
Copy link
Collaborator

jjyao commented Feb 9, 2025

@dayshah could you review this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go add ONLY when ready to merge, run all tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants