-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
status: disable and free fscache at the end of the status command #1909
status: disable and free fscache at the end of the status command #1909
Conversation
At the end of the status command, disable and free the fscache so that we don't leak the memory and so that we can dump the fscache statistics. Signed-off-by: Ben Peart <[email protected]>
Thank you! This change makes me wonder whether we need the same type of change elsewhere... Have you checked already, @benpeart? |
add and commit also enable but don't disable the fscache. I can submit a PR for those as well. One downside of actually disabling the fscache is that it takes time to free the fscache (especially with larger repos) so this will actually slow down commands. It would be nice to reduce that overhead somehow. I considered switching to the mem_pool() used by the index as it is a fast allocator and reduces the free() overhead to the set of blocks backing the pool (often just one if you predict the final size well) vs one per file and directory. The challenge is that it isn't thread safe so some additional locking added around it (or a mem_pool per thread) would need to be added. That also induces some overhead which would need to be measured to ensure we are choosing the path with the least overhead. |
…ter-status-gfw status: disable and free fscache at the end of the status command
…ter-status-gfw status: disable and free fscache at the end of the status command
status: disable and free fscache at the end of the status command
…ter-status-gfw status: disable and free fscache at the end of the status command
…ter-status-gfw status: disable and free fscache at the end of the status command
…ter-status-gfw status: disable and free fscache at the end of the status command
…ter-status-gfw status: disable and free fscache at the end of the status command
…ter-status-gfw status: disable and free fscache at the end of the status command
…ter-status-gfw status: disable and free fscache at the end of the status command
…ter-status-gfw status: disable and free fscache at the end of the status command
…ter-status-gfw status: disable and free fscache at the end of the status command
…ter-status-gfw status: disable and free fscache at the end of the status command
…ter-status-gfw status: disable and free fscache at the end of the status command
status: disable and free fscache at the end of the status command
status: disable and free fscache at the end of the status command
status: disable and free fscache at the end of the status command
status: disable and free fscache at the end of the status command
status: disable and free fscache at the end of the status command
status: disable and free fscache at the end of the status command
status: disable and free fscache at the end of the status command
status: disable and free fscache at the end of the status command
status: disable and free fscache at the end of the status command
status: disable and free fscache at the end of the status command
status: disable and free fscache at the end of the status command
status: disable and free fscache at the end of the status command
status: disable and free fscache at the end of the status command
status: disable and free fscache at the end of the status command
status: disable and free fscache at the end of the status command
…ter-status-gfw status: disable and free fscache at the end of the status command
…ter-status-gfw status: disable and free fscache at the end of the status command
status: disable and free fscache at the end of the status command
status: disable and free fscache at the end of the status command
status: disable and free fscache at the end of the status command
status: disable and free fscache at the end of the status command
status: disable and free fscache at the end of the status command
status: disable and free fscache at the end of the status command
status: disable and free fscache at the end of the status command
status: disable and free fscache at the end of the status command
status: disable and free fscache at the end of the status command
At the end of the status command, disable and free the fscache so that we don't leak the memory and so that we can dump the fscache statistics.
Signed-off-by: Ben Peart [email protected]