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
Do not delay Dashboard start for invalid Git repos #10918
Do not delay Dashboard start for invalid Git repos #10918
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Thank you
Then I will rebase this to 4.1 tonight. Some notes I should have added to the description: There may be ways to improve the detection time as well but this should be the big change. It should primarily affect the slow repos (start wsl?), Showing the status for other. (Wsl branch names are occasionally missing.) We are probably creating two GitModule in the async code. Some Ms per repo added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sensible, have not run
Add the repos to the lists without any I/O to check if the repo is invalid or not (to set the icon). Perform the check if a repo has a valid Git dir async, together with branchname retrieval and set the invalid icon then instead. Rendering of branchname failed if the item was rendered before the branchname was set. This had a much higher probability to occur after the item creation was changed. Menu item to remove invalid repos was only set from favorite repos, as _hasInvalidRepos was overwritten.
76f14e6
to
dd3bd96
Compare
I do not find an obvious way to check the path for network including wsl any faster.
No, this is fine, only one module. |
There has been related issues before, that has been addressed somehow.
I saw this issue after adding some repos to WSL and an USB stick,
Dashboard would require about 1:30 to open.
This could be included in 4.1, but I do not want to delay the release.
Proposed changes
Add the repos to the lists without any I/O to check if the repo is invalid or not (to set the icon).
Perform the check if a repo has a valid Git dir async, together with branch name retrieval and set the invalid icon then instead.
Rendering of branch name failed if the item was rendered before the branch name was set.
This had a much higher probability to occur after the item creation was changed.
Menu item to remove invalid repos was only set from favorite repos, as _hasInvalidRepos was overwritten.
Test methodology
Manual.
Merge strategy
I agree that the maintainer squash merge this PR (if the commit message is clear).
✒️ I contribute this code under The Developer Certificate of Origin.