Skip to content

Overall very slow response of Github Desktop GUI. #3724

Closed

Description

@JoFAM

Description

Github Desktop on Windows runs very slow and is hardly responsive. Switching between Changes and History takes 3-15 seconds. Opening the selector for the repositories takes multiple seconds as well. Basically every single step takes ages, but my CPU usage never exceeds 4-5%.

Version

GitHub Desktop version: 1.0.11
OS : Windows 10 - 1709 OS build 19299.125
GPU 1 : NVidia Geforce GTX - driver: GeForce Game Ready Driver version 388.71
GPU 0 : Intel(R) HD Graphics

Steps to Reproduce

  1. Open Github Desktop
  2. wait
  3. Click on "Current Repository"
  4. wait very long
  5. select another repository
  6. wait again
  7. Click on "History"
  8. wait 4-10 seconds before anything happens
  9. Click on a random earlier commit to see what changed.
  10. wait again for a very long time

Expected behavior: A responsive GUI

Actual behavior: A very unresponsive GUI

Reproduces how often: Every time

Logs

Additional Information

When using the dev tools feature, my CPU goes up to around 75%. Without, it never gets anywhere above 10%.

I run BitDefender as antivirus, and I had problems last month due to an update of their live threat analysis tool. But these ones are solved before. There's also a conflict with Windows Defender so I turned off the randomization of memory addresses in there (that caused my memory to fill up to over 90% without any programs open).

So no clue whether it's related to the mess Windows created with their hideous Creator Fall update, but Github Desktop is the only app I use that responds that slow.

Included are the log files of today, and a Performance recording doing the actions described in the Reproduction.

2018-01-04.desktop.production.log
Profile-20180104T140734.zip

Activity

  1. added
    investigation-needed
    on Jan 4, 2018
  2. self-assigned this
    on Jan 4, 2018
  3. shiftkey commented on Jan 5, 2018

    @shiftkey
    Member

    @JoFAM thanks for the performance log file - it definitely shows some interesting details I haven't encountered before. I've got a Windows 10 VM (4GB RAM, 2 CPU) running build 10.0.16299.192 and I'll use that to contrast the typical behaviour of the app.

    The "select repository" operation seems to be constrained by two spawn operations - which are retrieving the list of branches for the app - these are taking over 4s each, which is baffling:

    On my machine, using the Typescript repo that has 270ish active branches, these operations should finish much quicker than the 4-5s you're seeing:

    $ time git for-each-ref --format="{blah}" refs/heads refs/remotes
    ...
    
    real    0m0.171s
    user    0m0.000s
    sys     0m0.015s
    
    $ time git log -g --no-abbrev-commit --pretty=oneline HEAD -n 2500 --
    ...
    
    real    0m0.081s
    user    0m0.000s
    sys     0m0.000s

    Even the operation to refresh the local state of the repository is constrained by spawn taking multiple seconds:

    $ time git var GIT_AUTHOR_IDENT
    ...
    
    real    0m0.052s
    user    0m0.000s
    sys     0m0.000s
    
    $ time git remote -v
    ...
    
    real    0m0.048s
    user    0m0.000s
    sys     0m0.000s
    

    Two things that I'm curious about:

    • you mention anti-virus and some recent changes to your OS. The git we distribute in Desktop is signed, but maybe something is interfering with it's execution that is artificially slowing it (and thus the whole app) down?
    • is there something interesting about the repository shape/contents itself that might help me understand and reproduce this behaviour? Is this something that can be shared?

    There are some known issues with Git and forcing ASLR (I think that's what you're referring to when you mention Windows Defender's "randomization of memory addresses" which was reported in #3096 (comment), but that was causing the app to error, which is different to your behaviour.

    When using the dev tools feature, my CPU goes up to around 75%. Without, it never gets anywhere above 10%.

    I wouldn't worry about this. The DevTools will add overhead, especially when profiling, and it's not intended to be run continuously

  4. added
    more-info-needed
    and removed
    investigation-needed
    on Jan 5, 2018
  5. removed their assignment
    on Jan 5, 2018
  6. JoFAM commented on Jan 5, 2018

    @JoFAM
    Author

    MSI_SysInfo.zip

    I mistyped my Win build, that's 16299.125 (didn't update to the latest build yet).

    My antivirus is BitDefender Total Security 2018. And getting the actual build information turns out to be a pain... It has a technology "Advanced Threat Defense" that was updated somewhere start of december and blocked big part of my R build chain (R.exe, cmd.exe, miktex.exe and so forth). It also messed up the connection between git and RStudio, but it didn't complain directly about Github Desktop or the git version included with it.

    The behaviour is not bound to a specific repository, although I've noticed that repositories that I looked at before in the same session, do become more responsive.

    Very important information that I forgot: I do have another git version installed on my computer as well. That is:

    git 2.6.3.windows.1 (Tcl/Tk version 8.6.4)

    I use this for git processing using shell scripts and RStudio features.

    I also have TortoiseGit Version 2.5.0 as I find that convenient to use in Windows Explorer.

    EDIT: I added a zip folder with my system information in a .nfo file. If you need a text file instead, let me know.

  7. shiftkey commented on Jan 5, 2018

    @shiftkey
    Member

    It also messed up the connection between git and RStudio, but it didn't complain directly about Github Desktop or the git version included with it.

    This is interesting. Is there a way for you to be able to mute BitDefender temporarily and see if the behaviour of Desktop changes? Or see if other apps have been whitelisted that Desktop should be added to?

    The behaviour is not bound to a specific repository, although I've noticed that repositories that I looked at before in the same session, do become more responsive.

    We do some caching in the app, but most of the repository data isn't cached externally - so it would make sense that the initial session is particularly rough if Git is the bottleneck.

    EDIT: I added a zip folder with my system information in a .nfo file. If you need a text file instead, let me know.

    Those details all seem like a decent spec'd machine. I'm not worried about hardware being to blame.

    At this point I think something is hooking into the OS to meddle with our Git process spawning, and I've had enough run-ins with over-zealous AV to think that's worth digging into.

  8. JoFAM commented on Jan 6, 2018

    @JoFAM
    Author

    OK, my bad. I turned off all functionality in BitDefender and indeed, the problem disappeared. So it's them. I will go and haunt their QA department now.

    Thanks for thinking with me.

  9. shiftkey commented on Jan 6, 2018

    @shiftkey
    Member

    @JoFAM no problem - good luck!

  10. locked as resolved and limited conversation to collaborators on Jul 18, 2018
  11. unlocked this conversation on Sep 27, 2018
  12. 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

    more-info-neededperformance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions