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
CPU usage spikes due to refreshing sidebar indicators in background #7955
CPU usage spikes dramatically exactly every 15 Minutes when GitHub Desktop is running in the background. Probably related to this issue, which has been closed: #5789 For me the problem persists in newer versions.
This happens with automatic GPU switching enabled or disabled, and with both integrated or discrete GPU.
Do you notice GitHub Desktop's performance halting when you see these CPU spikes? There were reports of that in hangs often #4290.
Are you working with repositories that have a large number of branches?
Could you upload the log file from GitHub Desktop? That should show if there are any specific operations that are taking a long time to complete.
Thanks for writing in. Could you send over the log file from GitHub Desktop so that I could get some more information about this error? To access the log files go to the file menu in GitHub Desktop and select Help > Show Logs in Finder (macOS) or Explorer (Windows).
GitHub Desktop appears to be workin ok during the spike
Not a large number of branches, but a large number of files. Could that be the issue? I checked the log files and noticed the spikes were when the application ran background fetch.
Log file is attached. I deleted the repository it couldn't fetch.
I checked the log files and noticed the spikes were when the application ran background fetch.
This is an interesting clue, and we can see from the logs that you have ~38 tracked in the repository. This action is refreshing the details in our repository sidebar list, to help with two scenarios:
you have uncommitted changes in the repository, and might want to push them to the remote
there are new commits for the current branch, that you might want to work with
refreshIndicatorForRepository will run a git status as well as a background fetch (based on API results and it's current state) and git status appears to be an expensive call for some of these repositories:
This fits with the "large number of files" clue, as git status can be expensive on repositories with a large working directory.
One workaround to ease the load here would be to remove repositories from Desktop that you aren't using regularly, but I'm not sure how many of these 38 repositories you are using regularly.
changed the title [-]CPU usage spikes every 15 minutes when GitHub Desktop is running[/-][+]CPU usage spikes due to refreshing sidebar indicators in background[/+]on Jul 30, 2019
Background fetching can now be disabled by going to Preferences -> Advanced -> Background updates and deselecting the checkbox. @Tilmannn I'm going to close this issue out since it should be resolved by disabling background fetching, but let us know if anything has changed on your end.
Activity
[-]CPU usage[/-][+]CPU usage spikes every 15 minutes when GitHub Desktop is running[/+]steveward commentedon Jul 16, 2019
Thanks for the report @Tilmannn. A few questions:
Thanks for writing in. Could you send over the log file from GitHub Desktop so that I could get some more information about this error? To access the log files go to the file menu in GitHub Desktop and select
Help>Show Logs in Finder (macOS) or Explorer (Windows).Thanks!
Tilmannn commentedon Jul 16, 2019
Hi @steveward thanks for the reply.
2019-07-16.desktop.production.log
shiftkey commentedon Jul 30, 2019
This is an interesting clue, and we can see from the logs that you have ~38 tracked in the repository. This action is refreshing the details in our repository sidebar list, to help with two scenarios:
The function that does this work is here:
desktop/app/src/lib/stores/app-store.ts
Lines 2620 to 2642 in 8b48476
refreshIndicatorForRepositorywill run agit statusas well as a background fetch (based on API results and it's current state) andgit statusappears to be an expensive call for some of these repositories:This fits with the "large number of files" clue, as
git statuscan be expensive on repositories with a large working directory.One workaround to ease the load here would be to remove repositories from Desktop that you aren't using regularly, but I'm not sure how many of these 38 repositories you are using regularly.
[-]CPU usage spikes every 15 minutes when GitHub Desktop is running[/-][+]CPU usage spikes due to refreshing sidebar indicators in background[/+]steveward commentedon Mar 5, 2021
Background fetching can now be disabled by going to
Preferences->Advanced->Background updatesand deselecting the checkbox. @Tilmannn I'm going to close this issue out since it should be resolved by disabling background fetching, but let us know if anything has changed on your end.