{"action":"created","issue":{"url":"https://api.github.com/repos/magit/magit/issues/2909","repository_url":"https://api.github.com/repos/magit/magit","labels_url":"https://api.github.com/repos/magit/magit/issues/2909/labels{/name}","comments_url":"https://api.github.com/repos/magit/magit/issues/2909/comments","events_url":"https://api.github.com/repos/magit/magit/issues/2909/events","html_url":"https://github.com/magit/magit/issues/2909","id":197855804,"number":2909,"title":"Performance issues on OSX","user":{"login":"atomontage","id":453886,"avatar_url":"https://avatars.githubusercontent.com/u/453886?v=3","gravatar_id":"","url":"https://api.github.com/users/atomontage","html_url":"https://github.com/atomontage","followers_url":"https://api.github.com/users/atomontage/followers","following_url":"https://api.github.com/users/atomontage/following{/other_user}","gists_url":"https://api.github.com/users/atomontage/gists{/gist_id}","starred_url":"https://api.github.com/users/atomontage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atomontage/subscriptions","organizations_url":"https://api.github.com/users/atomontage/orgs","repos_url":"https://api.github.com/users/atomontage/repos","events_url":"https://api.github.com/users/atomontage/events{/privacy}","received_events_url":"https://api.github.com/users/atomontage/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2016-12-28T13:46:47Z","updated_at":"2016-12-31T16:15:30Z","closed_at":"2016-12-31T13:30:55Z","body":"\"2.9.0-34-gfee9c17c\"\r\nGIT: 2.11.0\r\n\r\nmagit-stage of a single file with a 5-line diff is perceivably slow, around 1 second.\r\nmagit-unstage also suffers from the same perceived slowdown.\r\n\r\nSome profiling data:\r\n\r\n* Stage\r\n```\r\nmagit-stage                                       1           0.8872        0.8872\r\nmagit-stage-1                                     1           0.887063      0.887063\r\nmagit-run-git                                     1           0.885151      0.885151\r\nmagit-process-file                                39          0.855452      0.0219346666\r\nmagit-refresh                                     1           0.669937      0.669937\r\nmagit-refresh-buffer                              1           0.668759      0.668759\r\nmagit-status-refresh-buffer                       1           0.666563      0.666563\r\nmagit-git-insert                                  14          0.491143      0.0350816428\r\nmagit-git-str                                     30          0.3144180000  0.0104806000\r\nmagit-rev-parse-safe                              28          0.2852569999  0.0101877499\r\nmagit-git-wash                                    4           0.225156      0.056289\r\nmagit-call-git                                    1           0.215206      0.215206\r\nmagit-toplevel                                    16          0.2069670000  0.0129354375\r\nmagit-call-process                                1           0.195608      0.195608\r\nmagit-git-items                                   2           0.1731359999  0.0865679999\r\n```\r\n* Unstage\r\n```\r\nmagit-unstage                                     1           0.943516      0.943516\r\nmagit-unstage-1                                   1           0.943387      0.943387\r\nmagit-run-git                                     1           0.924936      0.924936\r\nmagit-process-file                                44          0.912173      0.0207312045\r\nmagit-refresh                                     1           0.666068      0.666068\r\nmagit-refresh-buffer                              1           0.665038      0.665038\r\nmagit-status-refresh-buffer                       1           0.662804      0.662804\r\nmagit-git-insert                                  14          0.485324      0.0346659999\r\nmagit-git-str                                     35          0.3729509999  0.0106557428\r\nmagit-rev-parse-safe                              33          0.3445889999  0.0104420909\r\nmagit-call-git                                    1           0.258859      0.258859\r\nmagit-toplevel                                    17          0.2507959999  0.0147527058\r\nmagit-call-process                                1           0.243106      0.243106\r\nmagit-git-wash                                    4           0.207833      0.05195825\r\nmagit-git-items                                   2           0.165855      0.0829275\r\nmagit-insert-unstaged-changes                     1           0.16204       0.16204\r\nmagit-insert-status-headers                       1           0.157472      0.157472\r\nmagit-insert-untracked-files                      1           0.152695      0.152695\r\nmagit-insert-headers                              1           0.143047      0.143047\r\nmagit-insert-head-branch-header                   1           0.143032      0.143032\r\nmagit-git-string                                  17          0.116647      0.0068615882\r\nmagit-insert-remaining-headers                    1           0.114531      0.114531\r\nmagit-process-finish                              1           0.112665      0.112665\r\nmagit-mode-get-buffers                            2           0.112007      0.0560035\r\nmagit-process-buffer                              2           0.111826      0.055913\r\n```\r\n\r\n* Command line\r\n```\r\n❯❯ time git add test\r\n\r\nreal\t0m0.014s\r\nuser\t0m0.002s\r\nsys\t0m0.004s\r\n```\r\n\r\nThe amount of time spent for such a frequently-used operation is enough to lead to\r\nannoyance  and mental anguish on the part of the user :-]\r\n\r\nAlso note that I have 30 untracked files and 10 unstaged changes in this repo.\r\nMaybe this plays into magit-refresh/magit-refresh-buffer?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/magit/magit/issues/comments/269871587","html_url":"https://github.com/magit/magit/issues/2909#issuecomment-269871587","issue_url":"https://api.github.com/repos/magit/magit/issues/2909","id":269871587,"user":{"login":"atomontage","id":453886,"avatar_url":"https://avatars.githubusercontent.com/u/453886?v=3","gravatar_id":"","url":"https://api.github.com/users/atomontage","html_url":"https://github.com/atomontage","followers_url":"https://api.github.com/users/atomontage/followers","following_url":"https://api.github.com/users/atomontage/following{/other_user}","gists_url":"https://api.github.com/users/atomontage/gists{/gist_id}","starred_url":"https://api.github.com/users/atomontage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atomontage/subscriptions","organizations_url":"https://api.github.com/users/atomontage/orgs","repos_url":"https://api.github.com/users/atomontage/repos","events_url":"https://api.github.com/users/atomontage/events{/privacy}","received_events_url":"https://api.github.com/users/atomontage/received_events","type":"User","site_admin":false},"created_at":"2016-12-31T16:15:30Z","updated_at":"2016-12-31T16:15:30Z","body":"If it's a known issue can't you leave this open (or rename it to be more generic since it applies to other OSes too) so we can track it? \r\n\r\nIf you're dead-set on closing this, can you at least update the Performance section of the manual to make it obvious that \"calling git too much\" can be an issue. Right now the manual mentions refreshing buffers and recreating their content from scratch, which could be a different issue entirely, or it could be the root cause of calling git too much or both as implied by the profiling data (refreshing adds its own overhead on top of the time spent by calling out to git).\r\n\r\nIf you make it obvious that calling out to git a lot is a problem, others will have more information to get going with, assuming they want to dive in and attempt to fix."}}
{"actor":{"display_login":"atomontage"}}