2

I'm running magit in a medium-small project, on WSL2 through xming on windows 10.

The startup time for magit is in the high tens of seconds, and so is every other action. This is not the case in the repository for my emacs config which is also much smaller, so I wonder if I did something to the repo to make it so slow..

On the other hand, running git directly from the WSL2 terminal works great.

This is the CPU profiling from emacs (not sure how this would render here...):

Would love any advice, Thanks!

  • command-execute 9460 98%
  • call-interactively 9460 98%
  • funcall-interactively 9428 97%
  • magit-status 9425 97% - magit-status-setup-buffer 9425 97%
    • magit-setup-buffer-internal 9425 97%
    • magit-refresh-buffer 9418 97%
    • apply 9418 97%
    • magit-status-refresh-buffer 9417 97% - magit-run-section-hook 7558 78%
      • apply 7558 78%
      • magit-insert-unstaged-changes 2845 29%
      • magit-insert-untracked-files 2509 26%
      • magit-insert-status-headers 971 10%
      • magit-insert-unpushed-to-upstream-or-recent 510 5%
      • magit-insert-stashes 374 3%
      • magit-insert-staged-changes 193 2%
      • magit-insert-unpulled-from-upstream 123 1%
      • magit-insert-merge-log 25 0%
      • magit-insert-sequencer-sequence 3 0%
      • magit-insert-rebase-sequence 2 0%
      • magit-insert-am-sequence 1 0%
      • magit-insert-bisect-rest 1 0%
      • magit-insert-bisect-log 1 0% + magit-git-exit-code 1859 19%
    • magit-status-mode 6 0%
    • magit-get-mode-buffer 1 0% + execute-extended-command
      2 0% + doom/toggle-profiler
      1 0% + byte-code
      32 0%
  • ... 160 1%
  • redisplay_internal (C function) 4 0%
  • evil--jump-hook 2 0% winner-save-old-configurations
    1 0%
1
  • Is your larger repository stored within the Linux filesystem inside WSL2 or on a Windows drive? Accessing the Windows filesystem from WSL 2 is known to be quite slow. I regularly access a rather large repo located inside the WSL2 filesystem, which is nearly as fast as under Linux directly.
    – Martin
    Commented Sep 3, 2022 at 18:30

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.