You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
UI is incredibly slow while (indexing operation?) runs in background shortly after opening #5435
I have around 30 repos in my instance of Github Desktop. I've noticed that today the application appears to index the repos I have, and displays the blue badge next to ones which have uncommitted changes in them. I believe this is new behaviour, as earlier in the week I had to switch to a repo for the application to discover there were uncommitted changes in a repo. I like the new behaviour, but I think there is an issue with the way it is implemented. For a couple of minutes after opening, the UI was almost entirely unresponsive, with me clicking the current repo to open the list taking a second or two to open (or even respond to the mouse being over it), and then another second or two to do anything else. This is not an issue with my machine, as it is more than powerful enough.
I did notice while the list of repos was open that the badges were appearing (seemingly randomly, is there any order to it?) on repos, which has never happened before, which is why I think it's running through them looking for uncommitted changes and commits which haven't been synced with remote.
Version
GitHub Desktop: 1.3.3
Operating system: Windows 10 x64 16299
Expected/Actual Behavior
See description
Additional Information
I'm not sure if this is a first run feature or not, but if not, then it should be reproducable if you have 30 or more repos, with at least 5 of them with varying amounts of uncommitted changes, and try switching repo or doing anything on the UI while it does it.
@butler1233 thanks for the report. I'll add some extra context about this feature after an initial read.
The repository indicators are some new behaviour that we rolled out in 1.3.0 and have been looking to refine. It was disabled in 1.3.2 as a mitigation when you have more than 15 repositories listed, but 1.3.3 re-enabled this for everyone while also adding improvements to help keep the background work under control. Clearly we're not quite there yet.
I did notice while the list of repos was open that the badges were appearing (seemingly randomly, is there any order to it?) on repos, which has never happened before, which is why I think it's running through them looking for uncommitted changes and commits which haven't been synced with remote.
The rules for updating these repository indicators:
after having the app open for 2 minutes, start a refresh
on your machine, this finished after 25sec one time, and then 85sec another time
once that is complete, on a 15 minute interval, update again
(seemingly randomly, is there any order to it?)
I don't think this is done in the order that things are sorted in the repository list - something to look at once we're happy with the performance.
Looking at the rest of the operations in the log, I can see the timings on other Git calls are significantly slower than typical behaviour (CPU contention?), which is likely why the UI doesn't appear to be as snappy as in previous versions.
I also see a lot of git remote -v calls in there, which hopefully can be avoided once #5399 is merged.
Thinking on this some more, I think we really need to stagger the refresh operations rather than run them sequentially, especially if we're taking away from more important operations that the user is performing.
In pseudo-code:
// get a list of repositories that need to be updated
while (items.length > 0) {
requestIdleCallback {
// update indicators for repository
// remove from list
// if more repositories to update, wait again (15s?)
}
}
// set timer again to 15mins
@shiftkey , my bad for missing this! I do think staggering these operations or doing them in batches is the way to go. I'll work with @desktop/product to get this prioritized.
Activity
shiftkey commentedon Aug 19, 2018
@butler1233 thanks for the report. I'll add some extra context about this feature after an initial read.
The repository indicators are some new behaviour that we rolled out in 1.3.0 and have been looking to refine. It was disabled in 1.3.2 as a mitigation when you have more than 15 repositories listed, but 1.3.3 re-enabled this for everyone while also adding improvements to help keep the background work under control. Clearly we're not quite there yet.
The rules for updating these repository indicators:
I don't think this is done in the order that things are sorted in the repository list - something to look at once we're happy with the performance.
Looking at the rest of the operations in the log, I can see the timings on other Git calls are significantly slower than typical behaviour (CPU contention?), which is likely why the UI doesn't appear to be as snappy as in previous versions.
I also see a lot of
git remote -vcalls in there, which hopefully can be avoided once #5399 is merged.shiftkey commentedon Aug 19, 2018
Thinking on this some more, I think we really need to stagger the refresh operations rather than run them sequentially, especially if we're taking away from more important operations that the user is performing.
In pseudo-code:
cc @iAmWillShepherd @vanessayuenn for 👀 and other ideas
iAmWillShepherd commentedon Nov 1, 2018
@shiftkey , my bad for missing this! I do think staggering these operations or doing them in batches is the way to go. I'll work with @desktop/product to get this prioritized.
steveward commentedon Mar 20, 2023
Closing this out as stale since the app now offers the option to disable repository indicators along with other perf improvements in #10593.