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

"background" caching #7

Open
yarikoptic opened this issue Nov 13, 2020 · 0 comments
Open

"background" caching #7

yarikoptic opened this issue Nov 13, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@yarikoptic
Copy link
Member

we could run decorated function in the main thread and do "fingerprinting" in a separate thread (or process?), so that if fingerprint found unchanged, we interrupt execution of the main thread and return cached value, if we found that it changed -- we just keep going and store a new fingerprint.
this should be optional since probably would benefit only in the cases where underlying function is not stat-heavy itself. E.g. I would not use this around git status, but it might still be of benefit for datalad status which does git calls, which would operate on index etc, so there would be good amount of time spent on IO/text parsing etc. if we can make both fingerprinting and status run in parallel -- could be faster than fingerprinting + status sequentially.

@yarikoptic yarikoptic added the enhancement New feature or request label Nov 13, 2020
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

1 participant