Skip to content

Slow performance, excessive CPU usage #5226

Closed

Description

@109digital

Description

Extremely poor performance (slow execution of every single type of operation, prolonged excessive CPU use) 95% of the time, as reported by myself in #4290 and numerous others in various other threads.

As another user reported:

Any normal use. Trying to select anything in the menu. Even entering in a comment for a commit will freeze mid typing. Other programs in the OS are running fine.

At the most extreme, I have sat for 30+ minutes waiting for single commits to push. But on an everyday basis, routine actions such as repo refreshes typically take 3-10 minutes.

Windows Task Manager sometimes shows GD spawning dozens of threads at a time.

Here is a profile of the following actions as requested:

  • Refresh a repo (which only has the master branch and one commit)
  • Switch to another repo (a few branches, lengthy commit history)
  • Refresh that repo
  • Update branch from default (I noticed that the options for the "Branch" menu took several seconds to render)

While these operations were quite slow, I did not get the same excessive CPU usage that often accompanies such operations.

As you know, I have eliminated antivirus/anti-malware interference as outlined in #4290

Git-related performance issues persist across repositories, regardless of size or structure. Severe lag/hanging of local actions (rendering menu options, typing, etc.) is persistent.

Version

  • GitHub Desktop:

1.3.0 beta 3

  • Operating system:

https://github.com/desktop/desktop/files/2220882/machine-output.zip

It's worth mentioning that the performance issues have persisted across machines and OS versions (Win7/10).

Logs

https://github.com/desktop/desktop/files/2220877/Profile-20180723T161536.zip

Activity

  1. self-assigned this
    on Jul 23, 2018
  2. shiftkey commented on Jul 24, 2018

    @shiftkey
    Member

    @109digital thanks for the performance profile and machine details. I'm still digging into this but the most interesting thing I wanted to call out is how the Git operations are performing:

    spawn action execution time
    getStatus 5.86s
    getBranches 5.00s
    getRecentBranches 2.00s
    ??? 1.97s
    getConfigValue 2.00s
    ??? 0.99s
    ??? 0.99s
    fetch 3.90s
    getConfigValue 1.99s
    loadLocalCommits 3.00s
    loadRemotes 3.00s
    getAuthorIdentity 1.00s
    loadLocalCommits 2.00s
    loadRemotes 0.99s
    getAuthorIdentity 2.00s
    loadHistory 3.00s
    fetch 2.98s
    getStatus 3.00s
    getBranches 1.99s
    getRecentBranches 0.99s
    fetch 1.98s
    getConfigValue 2.99s
    getConfigValue 3.00s
    loadLocalCommits 4.00s
    loadRemotes 2.00s
    getStatus 7.00s
    loadHistory 5.00s
    getConfigValue 3.99s
    getStatus 10.00s
    ??? 10.00s
    getCommit 0.99s
    loadLocalCommits 1.00s
    loadRemotes 0.99s
    getAuthorIdentity 0.99s
    getConfigValue 2.00s
    getStatus 4.99s
    ??? 5.99s
    ??? 7.00s
    getConfigValue 3.01s
    getConfigValue 3.00s
    getStatus 3.98s
    loadHistory 2.00s
    pruneForkedRemotes 3.75s
    loadStatus 3.06s
    getBranches 2.00s
    getRecentBranches 0.99s
    getBranches 1.00s
    getRecentBranches 1.00s
    getConfigValue 2.97s
    getCommit 5.99s
    getConfigValue 6.98s
    ??? 3.99s
    getConfigValue 2.99s
    pruneForkedRemotes 2.99s
    getConfigValue 2.00s
    ??? 3.00s

    All of these use the NodeJS spawn API, and the pattern of the majority of them (within a tolerance of a few milliseconds) executing in a round number of seconds is what I'd like to figure out. The ??? entries above were traced to microtasks, so I didn't have the full stack to identify them with.

    These are important because we require Git data in the app, and if these are running slow then it'll affect the whole experience of the app (because we're waiting for data).

    I'm going to wrap my head around how spawn interoperates with the Windows OS, because maybe that will help me with troubleshooting.

    A few questions I have to help with my investigating:

    Windows Task Manager sometimes shows GD spawning dozens of threads at a time.

    Is this GitHubDesktop.exe you're measuring? I'm less interested in this stat at the moment because Desktop should be spawning git.exe instances to perform Git operations on a repository, and that appears to be the bottleneck for app responsiveness. If these git.exe operations are consuming 100% CPU time then it's likely to affect the rest of the app.

    Do you see any other programs taking CPU time when Desktop is running aside from git.exe? This might be a clue for some unexpected interactions that we aren't aware of between running programs/services.

    It's worth mentioning that the performance issues have persisted across machines and OS versions (Win7/10).

    What software in common is installed on both these machines that might help me reproduce this issue on my end?

  3. added
    more-info-needed
    investigation-needed
    on Jul 24, 2018
  4. 109digital commented on Jul 24, 2018

    @109digital
    Author

    Is this GitHubDesktop.exe you're measuring?

    Sample here. I also created a dump from task manager, but it seems to have captured an entirely different set of information - I didn't see anything in there about running processes, resource consumption, etc.

    The trouble with monitoring this when the resource usage is at its most extreme is that my system virtually freezes, only bringing up task manager (or updating it) when it finishes processing whatever GD is doing. This can take anywhere from 5-20 seconds.

    I've sat here for a few minutes switching between repos and refreshing, trying to reproduce. And while the operations are consistently slow, I'm not seeing the crippling resource consumption that randomly occurs. I'm not sure how to reproduce that piece, it just happens randomly.

    Do you see any other programs taking CPU time when Desktop is running aside from git.exe?

    Not really. As I said though, nothing responds - include Task Manager - during the occasional/random periods of intense resource usage, so it's hard for me to tell. Generally speaking, Github's CPU usage (and my overall CPU usage) is < 50%.

    What software in common is installed on both these machines that might help me reproduce this issue on my end?

    That are actually running while GD is open? Chrome is probably the only major commonality I can think of. Skype and Postbox, but I highly doubt they are causing this.

  5. shiftkey commented on Jul 24, 2018

    @shiftkey
    Member

    The trouble with monitoring this when the resource usage is at its most extreme is that my system virtually freezes, only bringing up task manager (or updating it) when it finishes processing whatever GD is doing. This can take anywhere from 5-20 seconds.

    Let me see if I can put together instructions for using Perfmon or similar so you can capture this data in a scripted way. I'll report back once I've figured out some steps to follow that will give me helpful context.

    That are actually running while GD is open?

    I'm more interested in installed software - something that's registered itself to run as a service or is running as a process in the background not necessarily started by you when you're also running Desktop.

  6. 109digital commented on Jul 25, 2018

    @109digital
    Author

    I will try to use it. I'm currently in the midst of a refresh operation which is now pushing 20 minutes.

  7. 109digital commented on Aug 1, 2018

    @109digital
    Author

    Let me see if I can put together instructions for using Perfmon or similar so you can capture this data in a scripted way. I'll report back once I've figured out some steps to follow that will give me helpful context.

    I have Perfmon installed, please let me know what you need...

  8. 109digital commented on Aug 6, 2018

    @109digital
    Author

    @shiftkey

    Hi, please let me know how I can use Perfmon to continue diagnosing the issue.

  9. 109digital commented on Aug 8, 2018

    @109digital
    Author

    Are these the counters I should use? Any others?

  10. 109digital commented on Aug 10, 2018

    @109digital
    Author

    @shiftkey Following up...

  11. 109digital commented on Aug 15, 2018

    @109digital
    Author

    @shiftkey Following up

  12. lee-dohm commented on Aug 15, 2018

    @lee-dohm
    Contributor

    @109digital I can understand you're frustrated with the lack of response here. Frankly, we're unable to reproduce this or find any useful information in the logs that you've shared so far. We're still intending on looking into this as time allows and will see if we get any fresh ideas. The issue remains open specifically because we acknowledge that it is something that we still intend to work on. When we have something meaningful to add, we'll respond to the issue.

    However, your actions, specifically repeatedly pinging for a response with no new information and even reaching out directly and privately to our maintainers, constitute harassment under the Desktop Code of Conduct. You may consider this an official warning.

  13. j-f1 commented on Aug 15, 2018

    @j-f1
    Contributor

    @lee-dohm I think they’re waiting on instructions:

    Hi, please let me know how I can use Perfmon to continue diagnosing the issue.

  14. 109digital commented on Aug 15, 2018

    @109digital
    Author

    Frankly, we're unable to reproduce this

    From a support conversation with Steve Ward on 5/7/18:

    I have been able to reproduce some performance issues when working with large repository sizes. If you take a look at Task Manager during these performance issues do you notice the GitHubDesktop.exe process spiking in CPU usage significantly?

    Just look around in the issues here, you'll find plenty of people complaining about the same problems I've experienced ever since I started using GitHub Desktop. I get it - one user is a meaningless edge case. But I am not the only person experiencing severe performance issues. You're deluding yourself if you think there is nothing to see here. And I'd venture that many users just suffer through it without saying anything.

    or find any useful information in the logs that you've shared so far.

    Brendan seemed to have found useful information in the profile data I posted, and advised that Perfmon data could possibly pinpoint the cause of the issue. Direction on how to provide that, as j-f1 pointed out, is exactly what I have been requesting.

    pinging for a response with no new information

    See above. The request was for him to follow through so I could supply additional information. You guys do actually want to solve bugs, right?

    even reaching out directly and privately to our maintainers

    Yes, after weeks of being ignored, I emailed the publicly listed address on his profile, asking him to please direct me to someone who can help me, as he appears to be too busy.

    Threaten and ignore me all you wish, but you are doing a tremendous disservice to the users who are struggling with GitHub Desktop's performance on Windows.

    Believe me, I would love to leave you guys alone and just pay another company. I don't believe in having to beg for product support. But unfortunately, there doesn't seem to be a suitable alternative so for now, I'm just getting through by making simple commits through the web UI, and budgeting extra time when GitHub Desktop is needed.

  15. lee-dohm commented on Aug 15, 2018

    @lee-dohm
    Contributor

    I understand that you feel ignored but we have been contacted by you across three platforms and statements like “You do actually want to solve bugs” is insulting to the people in this community who work very hard to make sure everyone who comes in has a good experience. Because these comments are doing more harm than good and you feel justified in emailing individuals personally with similar comments, we will be banning you.

    We don’t want anyone to have performance issues or have to adjust your workflow to get the job done. This is something the team is working on. Unfortunately, this work takes time. It is hard to find the quick fix for every issue and we realize it’s the pain in the present that is frustrating. We haven’t forgotten about you or the other folks who have posted issues and are patiently waiting for answers. Until then, there are other alternative Git interfaces that are architected differently and we don’t take it personally if you have to switch!

  16. removed their assignment
    on Aug 21, 2018
  17. jpetro416 commented on Nov 25, 2019

    @jpetro416

    Same issue here, randomly freezing. The APP has an issue, let's be clear about that. An intel 9900k and 32GB RAM on a fresh Windows install shouldn't be having this issue. I've switched over to my laptop running an i7 9750h 16GB ram with the same stuttering issue. It's not our PC's, this is an internal issue for sure.

  18. antoniokly commented on Jun 18, 2020

    @antoniokly

    still an issue here
    image

  19. added
    performance
    on Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    investigation-neededmore-info-neededperformance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions