Skip to content

Constantly using 400+% of CPU #5789

Closed
Closed

Description

@ReagentX

Description

  • GitHub Desktop: 1.4.1
  • Operating system: MacOS Mojave 10.14 (18A391)

Steps to Reproduce

  1. Open Github Desktop

Expected Behavior

Program uses very little CPU

Actual Behavior

Program consistently uses 400% or more CPU

Additional Information

Logs

2018-09-30T00:16:34.405Z - info: [ui] Background fetch for 17 repositories took 5.781sec
2018-09-30T00:31:35.804Z - info: [ui] Background fetch for 17 repositories took 6.120sec
2018-09-30T00:46:35.181Z - info: [ui] Background fetch for 17 repositories took 5.947sec
2018-09-30T01:01:34.175Z - info: [ui] Background fetch for 17 repositories took 5.641sec
2018-09-30T01:16:34.617Z - info: [ui] Background fetch for 17 repositories took 6.113sec
2018-09-30T01:31:34.817Z - info: [ui] Background fetch for 17 repositories took 6.345sec
2018-09-30T01:32:07.104Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: sixteenzero - ReagentX (has token)
2018-09-30T01:46:39.099Z - info: [ui] Background fetch for 17 repositories took 7.036sec
2018-09-30T02:01:34.883Z - info: [ui] Background fetch for 17 repositories took 5.803sec
2018-09-30T02:15:14.418Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: sixteenzero - ReagentX (has token)
2018-09-30T02:15:21.862Z - info: [ui] Executing push: git -c credential.helper= push origin master:master --progress (took 7.434s)
2018-09-30T02:16:34.395Z - info: [ui] Background fetch for 17 repositories took 6.014sec
2018-09-30T02:31:41.757Z - info: [ui] Background fetch for 17 repositories took 7.413sec
2018-09-30T02:46:36.427Z - info: [ui] Background fetch for 17 repositories took 6.464sec
2018-09-30T03:01:37.304Z - info: [ui] Background fetch for 17 repositories took 6.616sec
2018-09-30T03:16:38.260Z - info: [ui] Background fetch for 17 repositories took 6.928sec
2018-09-30T03:31:38.466Z - info: [ui] Background fetch for 17 repositories took 5.739sec
2018-09-30T03:46:38.111Z - info: [ui] Background fetch for 17 repositories took 5.949sec
2018-09-30T04:01:39.000Z - info: [ui] Background fetch for 17 repositories took 5.975sec
2018-09-30T04:16:34.746Z - info: [ui] Background fetch for 17 repositories took 5.750sec
2018-09-30T04:31:36.104Z - info: [ui] Background fetch for 17 repositories took 6.762sec
2018-09-30T04:46:36.299Z - info: [ui] Background fetch for 17 repositories took 5.860sec
2018-09-30T05:01:36.346Z - info: [ui] Background fetch for 17 repositories took 6.060sec
2018-09-30T05:07:58.119Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: sixteenzero - ReagentX (has token)
2018-09-30T05:12:43.912Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: sixteenzero - ReagentX (has token)
2018-09-30T05:16:34.307Z - info: [ui] Background fetch for 17 repositories took 6.296sec
2018-09-30T05:31:34.621Z - info: [ui] Background fetch for 17 repositories took 6.641sec
2018-09-30T05:46:34.395Z - info: [ui] Background fetch for 17 repositories took 6.447sec
2018-09-30T06:01:34.158Z - info: [ui] Background fetch for 17 repositories took 6.239sec
2018-09-30T06:16:33.751Z - info: [ui] Background fetch for 17 repositories took 5.862sec
2018-09-30T06:31:35.004Z - info: [ui] Background fetch for 17 repositories took 6.331sec
2018-09-30T06:46:36.640Z - info: [ui] Background fetch for 17 repositories took 7.163sec
2018-09-30T16:04:43.348Z - info: [ui] Background fetch for 17 repositories took 5.992sec
2018-09-30T16:19:42.694Z - info: [ui] Background fetch for 17 repositories took 6.364sec
2018-09-30T16:34:46.656Z - info: [ui] Background fetch for 17 repositories took 6.190sec
2018-09-30T16:49:44.432Z - info: [ui] Background fetch for 17 repositories took 6.139sec
2018-09-30T17:04:42.420Z - info: [ui] Background fetch for 17 repositories took 5.983sec
2018-09-30T17:19:42.873Z - info: [ui] Background fetch for 17 repositories took 5.491sec
2018-09-30T17:34:42.780Z - info: [ui] Background fetch for 17 repositories took 6.983sec
2018-09-30T17:49:42.869Z - info: [ui] Background fetch for 17 repositories took 6.339sec
2018-09-30T18:04:43.896Z - info: [ui] Background fetch for 17 repositories took 5.772sec
2018-09-30T18:19:41.288Z - info: [ui] Background fetch for 17 repositories took 5.604sec
2018-09-30T18:34:39.987Z - info: [ui] Background fetch for 17 repositories took 5.816sec
2018-09-30T18:49:44.597Z - info: [ui] Background fetch for 17 repositories took 5.735sec
2018-09-30T19:04:42.356Z - info: [ui] Background fetch for 17 repositories took 5.875sec
2018-09-30T19:19:38.388Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: pydemos - ReagentX (has token)
2018-09-30T19:19:43.796Z - info: [ui] Background fetch for 17 repositories took 7.345sec
2018-09-30T19:34:41.075Z - info: [ui] Background fetch for 17 repositories took 6.286sec
2018-09-30T19:49:44.730Z - info: [ui] Background fetch for 17 repositories took 5.484sec
2018-09-30T20:04:43.504Z - info: [ui] Background fetch for 17 repositories took 5.995sec
2018-09-30T20:19:41.892Z - info: [ui] Background fetch for 17 repositories took 5.549sec
2018-09-30T20:34:44.146Z - info: [ui] Background fetch for 17 repositories took 6.092sec
2018-09-30T20:49:40.228Z - info: [ui] Background fetch for 17 repositories took 6.336sec
2018-09-30T21:01:40.109Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: sixteenzero - ReagentX (has token)
2018-09-30T21:02:00.866Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: pydemos - ReagentX (has token)
2018-09-30T21:02:27.568Z - info: [ui] [AppStore.withAuthenticatingUser] account found for repository: pydemos - ReagentX (has token)
2018-09-30T21:04:41.545Z - info: [ui] Background fetch for 17 repositories took 7.015sec
2018-09-30T21:14:35.498Z - info: [ui] [AppStore] loading 17 repositories from store
2018-09-30T21:14:35.498Z - info: [ui] [AppStore] found account: ReagentX (Christopher Sardegna)
2018-09-30T21:14:35.908Z - info: [ui] launching: 1.4.1 (Mac OS 10.14.0)
2018-09-30T21:14:35.908Z - info: [ui] execPath: '/Users/chris/Applications/GitHub Desktop.app/Contents/Frameworks/GitHub Desktop Helper.app/Contents/MacOS/GitHub Desktop Helper'
2018-09-30T21:16:43.550Z - info: [ui] Background fetch for 17 repositories took 6.666sec

Activity

  1. iAmWillShepherd commented on Oct 1, 2018

    @iAmWillShepherd
    Contributor

    Thanks for taking the time to open an issue! 🙇

    Could you share some more info on the machine you're using to run Desktop?

    • Model
    • CPU (include core count and thread count as well as
    • RAM
    • Available storage

    Judging by the logs, your CPU ramps up every 15 mins, is that the behavior you're observing?

  2. added
    more-info-needed
    on Oct 1, 2018
  3. ReagentX commented on Oct 1, 2018

    @ReagentX
    Author
    • 15” MacBook Pro Mid-2015
    • 2.8GHz i7 (4980HQ), 4 cores, 8 threads
    • 16GB DDR3
    • 512GB SSD, ≈100GB free

    It doesn’t ramp up, GitHub Desktop just stays at 400% CPU usage while it’s open.

  4. joaomlneto commented on Oct 4, 2018

    @joaomlneto
    Contributor

    @ReagentX I can't reproduce (GitHub Desktop 1.4.1, macOS Mojave 10.14, MBP mid-2015; w/ AMD graphics, 2.5GHz CPU).

    Are you sure it's the CPU and you're not seeing increased fan spinning due to the discrete graphics after upgrading to Mojave?

  5. ReagentX commented on Oct 4, 2018

    @ReagentX
    Author

    Yes, I am specifically monitoring CPU usage.

  6. shiftkey commented on Oct 14, 2018

    @shiftkey
    Member

    @ReagentX can you try grabbing a timeline profile of the app idling, based on the doc I just refreshed in #5899? I'd love to understand more about what the app is doing when idle to help troubleshoot further.

  7. added
    macOS
    on Oct 14, 2018
  8. ReagentX commented on Oct 28, 2018

    @ReagentX
    Author

    The profile ended up being over 70mb, which is too big to attach here. I uploaded it here.

  9. shiftkey commented on Oct 31, 2018

    @shiftkey
    Member

    @ReagentX thanks for the extra details. I'm not quite sure what's happening on your setup but I'll call out some interesting things that I've spotted:

    The CPU usage of the main app is relatively low overall (the orange chart) but the FPS chart has lots of gaps (which suggests something is awry with painting the UI):

    The frames list, which breaks down how long it took to draw each frame, shows some periods where it's above 30fps (so it's responsive) but then has some periods where it takes 30s - 90s (yep, seconds) to paint. I can't see anything interesting in the main process flame graphs to indicate something is stealing CPU time (for example, Git operations) but the only thing I can see is GPU activity.

    @ReagentX could you try setting the GITHUB_DESKTOP_DISABLE_HARDWARE_ACCELERATION environment variable to a value like 1 and launching Desktop fresh? I had an issue a while ago where some update changed the graphics card settings on my macOS, and I wonder if you're encountering something similar.

  10. added
    investigation-needed
    and removed
    more-info-needed
    on Oct 31, 2018
  11. ReagentX commented on Nov 23, 2018

    @ReagentX
    Author

    Seeing as no other app on my Mac has issues with automatic graphics switching I would chalk that up to a bug in Github Desktop and not a bug in MacOS. However, on the latest public build of Desktop (1.5.0) I am unable to replicate the same CPU hogging behavior so I am going to close this issue.

  12. NicoClack commented on Aug 1, 2020

    @NicoClack

    I've got this too on an iMac. It's been sitting at 300+% since I installed it :/

  13. 7 remaining items

  14. devonschmidt commented on Oct 24, 2020

    @devonschmidt

    Also, having this issue.

  15. dratushnyy commented on Oct 24, 2020

    @dratushnyy

    Also having this issue, however, the workaround from @shiftkey seems working

  16. jasonfutch commented on Oct 27, 2020

    @jasonfutch

    Same issue

  17. niklaskallina commented on Oct 27, 2020

    @niklaskallina

    same here

  18. lochyb commented on Nov 8, 2020

    @lochyb

    Same issue on a Macbook Air 2015 model.

  19. asiboe commented on Dec 17, 2020

    @asiboe

    Having the same issue, specifically the github desktop helper used over 400% CPU even after I quit the application
    MacBook Pro Mid 2015 model, 2,5 GHz Intel Core i7, 16gb

  20. Darbjm commented on Dec 17, 2020

    @Darbjm

    Same for me, just updated to Big Sur. MacBook Pro (Retina, 15-inch, Mid 2014), 2.2 GHz Quad-Core Intel Core i7, 16 GB

  21. zero0zero7 commented on Dec 22, 2020

    @zero0zero7

    same here. Macbook Pro 2020, 16gb

  22. duaneking commented on Feb 4, 2021

    @duaneking

    Just had this app use up over my 400% of my Macs CPU, brand new install for hardware received and updated to the newest everything last night from a empty blank slate. MacBook Pro 16-inch 2019, 16gb ram.

  23. xammah commented on Feb 18, 2021

    @xammah

    Chiming in with the same issue, Macbook Pro 2019 8GB i5 running OSX 10.14.6

  24. captainbamb0o commented on Feb 27, 2021

    @captainbamb0o

    same here. Over 400% of my MacBook Pro 2020 16GB i7

  25. MarshmallowFlame commented on Mar 23, 2021

    @MarshmallowFlame

    Got this as well on MacBook Pro 16-inch 2019 running Big Sur. Over 500% :)

  26. steveward commented on Dec 15, 2021

    @steveward
    Contributor

    From #13540:

    When the desktop app updater window pops up asking for credentials, if it goes unnoticed, it will spin up the CPU. I stepped away from my laptop running macOS Big Sur and when I came back the fans were going nuts. Checking activity monitor showed it was using 99.9% CPU.

  27. steveward commented on May 18, 2023

    @steveward
    Contributor

    We have a few more current performance issues (#10625 which links this issue and #13586), so I'm going to close this out to help consolidate our issues tracker.

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-neededmacOSperformance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions