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

Use LRU cache in rudimentary ways #12

Closed
Moelf opened this issue Sep 13, 2020 · 3 comments
Closed

Use LRU cache in rudimentary ways #12

Moelf opened this issue Sep 13, 2020 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@Moelf
Copy link
Member

Moelf commented Sep 13, 2020

Probably for 2.0 release or something but I ran into some very light / nice implementation for example https://github.com/marius311/Memoization.jl .

I realized uproot4 has dropped the way-too-many kinds of cache so we probably should learn from Jim in making one here. I think a good start would be to at leach cache whole branch / tree if they fit, in case users are doing some small exploration work.

For the larger-than-RAM TChain like event loop, cache is less useful:

  1. user probably is running a script (so a one-off thing)
  2. LRU cache is useless since accessed elements are >> RAM size.
@Moelf Moelf changed the title Use LRU cache Use LRU cache in rudimentary ways Sep 13, 2020
@tamasgal
Copy link
Member

Thanks Jerry, LRU is definitely on the feature-list and Memoization.jl looks definitely nice!

Yes, indeed, uproot4 massively simplified the caching, we should definitely go that path ;)

@tamasgal tamasgal added the enhancement New feature or request label Sep 13, 2020
@tamasgal tamasgal added this to the Version 1.0 milestone Sep 13, 2020
@tamasgal
Copy link
Member

Let's put it in v1 (hopefully in 2020)

@Moelf
Copy link
Member Author

Moelf commented Jul 7, 2021

closed by #24, now we cache decompressed basketbytes based on (ROOTFile, branch, ith_basket)
https://github.com/tamasgal/UnROOT.jl/blob/ce28568b4c054afee02d323f7c4d96b56aff580e/src/root.jl#L240

@Moelf Moelf closed this as completed Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants