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

perf: make history traversal faster by caching them in the fs #6606

Merged
merged 3 commits into from
Oct 28, 2022

Conversation

davidfirst
Copy link
Member

Some commands, such as bit status traverse component history to get valuable data such as the distance between the local and the remote. This operation is pretty expensive as it requires to read each Version object from the filesystem to get its parent.
This PR caches per component all the versions history-data it found. In some scenarios, when on a lane with lots of components and versions, it makes bit status 2.5 times faster.

@davidfirst davidfirst enabled auto-merge (squash) October 28, 2022 01:42
@davidfirst davidfirst merged commit 8ef7225 into master Oct 28, 2022
@davidfirst davidfirst deleted the cache-versions-history branch October 28, 2022 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants