-
Notifications
You must be signed in to change notification settings - Fork 178
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
Speed up yadm by caching results of git calls #505
Comments
It would be interesting to see how much difference it makes if you replace the calls with hard coded values (i.e. the optimal case)? |
In an iSH emulation environment, running a simple yadm command can take 45+ seconds with auto-alt and auto-perms enabled, and 7.5 seconds when they're disabled. I will explore how this can be sped up. #466 should help when auto-alt is enabled. |
* Simplify score_file() by using case in instead of nested ifs with regexps. * Merge record_score() and record_template(). * Alt condition processing no longer stops when a template condition is seen but continues processing to verify that all conditions are valid (as the documentation says it should). Fixes #478. * Support alt dirs with deeply nested tracked files (fixes #495). * Use git ls-files to filter out which tracked files to consider for alt processing. Should speed up auto-alt (#505).
@rasa: If you have the time, please test with the deep-alt branch and let me know if that improved the performance. |
* Simplify score_file() by using case in instead of nested ifs with regexps. * Merge record_score() and record_template(). * Alt condition processing no longer stops when a template condition is seen but continues processing to verify that all conditions are valid (as the documentation says it should). Fixes #478. * Support alt dirs with deeply nested tracked files (fixes #490). * Use git ls-files to filter out which tracked files to consider for alt processing. Should speed up auto-alt (#505). * Use nocasematch when comparing distro and distro_family. Fixed #455.
I ran
deep-alt:
so it's a 50% speed increase. Worth it! |
No speed up on
|
* Simplify score_file() by using case in instead of nested ifs with regexps. * Merge record_score() and record_template(). * Alt condition processing no longer stops when a template condition is seen but continues processing to verify that all conditions are valid (as the documentation says it should). Fixes #478. * Support alt dirs with deeply nested tracked files (fixes #490). * Use git ls-files to filter out which tracked files to consider for alt processing. Should speed up auto-alt (#505). * Use nocasematch when comparing distro and distro_family. Fixed #455.
* Simplify score_file() by using case in instead of nested ifs with regexps. * Merge record_score() and record_template(). * Alt condition processing no longer stops when a template condition is seen but continues processing to verify that all conditions are valid (as the documentation says it should). Fixes #478. * Support alt dirs with deeply nested tracked files (fixes #490). * Use git ls-files to filter out which tracked files to consider for alt processing. Should speed up auto-alt (#505). * Use nocasematch when comparing distro and distro_family. Fixed #455.
@rasa: Could you please test with the test-workflow branch? It now includes the fixes from the deep-alt branch + a change to how parse_encrypt is implemented which may affect the run time. |
@erijo We lost about a second on iSH, using the test-workflow branch:
|
Is your feature request related to a problem? Please describe.
yadm can be slow on slower systems.
Describe the solution you'd like
Cache expensive git calls.
Additional context
When I run
yadm commit
on my system, these are the commands that are run, and how often (found usingGIT_TRACE=1
):The results of at least the
git config
commands can be cached to speed things up, yes?If you are open to this enhancement, I will draft a PR for your review.
The text was updated successfully, but these errors were encountered: