Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On next, staging (in my "dot-emacs" repository) is extremely slow #1772

Closed
jwiegley opened this issue Mar 18, 2015 · 12 comments
Closed

On next, staging (in my "dot-emacs" repository) is extremely slow #1772

jwiegley opened this issue Mar 18, 2015 · 12 comments
Labels
bug unconfirmed Maybe a bug, but unable to reproduce support User needs some help
Milestone

Comments

@jwiegley
Copy link
Contributor

Maybe because I'm also doing a multi-core build at the same time, but staging a single file takes about 6-10 seconds.

@tarsius
Copy link
Member

tarsius commented Mar 18, 2015

Are there many submodules and did you read https://github.com/magit/magit/wiki/FAQ#what-can-i-do-about-poor-performance?

@tarsius tarsius modified the milestone: support/needinfo/... Mar 20, 2015
@tarsius tarsius added the support User needs some help label Mar 20, 2015
@tarsius tarsius added the bug unconfirmed Maybe a bug, but unable to reproduce label Apr 1, 2015
@tarsius
Copy link
Member

tarsius commented Apr 3, 2015

Performance still has to be improved a lot, but that will require big changes which have to wait until after the release. Did following these instructions help?

@tarsius
Copy link
Member

tarsius commented Apr 3, 2015

(There's one thing I will attempt before the release, so there is some hope).

@jwiegley
Copy link
Contributor Author

jwiegley commented Apr 3, 2015

I haven't yet dug through it. On my Linux machine I have a medium sized project where the very first s to stage a single file still takes up to 10 seconds, but thereafter is fine. It uses no sub-modules.

@jwiegley
Copy link
Contributor Author

It's odd how consistent this behavior is. On my work machine, the first 's' of the day to stage a file is extremely slow (up to 20 seconds), but thereafter it's extremely fast. It's like some kind of cache needing to be primed or something.

@daveloyall
Copy link

@jwiegley "Emacs starts quicker with autoloaded functions, since their libraries are not loaded right away; but you need to wait a moment when you first use such a function, while its containing file is evaluated." from https://www.gnu.org/software/emacs/manual/html_node/eintr/Autoload.html

next received some commits related to autoloads recently.

Could what you experience be related to this?

EDIT: hmm, your original issue was opened 24 days ago.

@jwiegley
Copy link
Contributor Author

I don't think that's it, but you never know. I'll run elp on it tomorrow.

@tarsius tarsius modified the milestones: 2.1.0, support/needinfo/... Apr 11, 2015
@jwiegley
Copy link
Contributor Author

@tarsius Here's something interesting: I'm staging a single file, but magit-git-insert is called 26 times. I wonder if this is because I enabled magit-backup?

@phil-s
Copy link
Contributor

phil-s commented Apr 13, 2015

Perhaps not relevant for jwiegley, but FWIW magit-auto-revert-mode is the biggest culprit for me when magit actions are slow. In my current repo, without auto-revert, staging or unstaging takes ~0.4 seconds. With auto-revert processing 72 buffers I get this:

magit-stage               1           2.70008108    2.70008108
magit-run-git             1           2.6999679370  2.6999679370
magit-refresh             1           2.637550241   2.637550241
magit-revert-buffers      1           2.277339453   2.277339453
magit-revert-buffer       72          1.9534885929  0.0271317860

So if magit seems slow, make sure you check whether this is the issue.

I've logged issue #1807 related to this.

@tarsius
Copy link
Member

tarsius commented Apr 17, 2015

@jwiegley Yeah, magit-backup-mode is to slow - I think I mentioned that. Fun fact, when such a feature was first suggested I rejected it on the grounds of it being to slow :-) Anyway this can be improved by not using stashes but two "parallel" wip refs - one for the index and one for the worktree. But that has to wait until after the release.

@tarsius
Copy link
Member

tarsius commented Apr 29, 2015

@jwiegley I just pushed some speedups, #1830. If performance is still poor after updating and disabling magit-backup-mode, then first verify that it's not #1807. If it's not then please provide some useful benchmarks and reopen.

@tarsius tarsius closed this as completed Apr 29, 2015
@jwiegley
Copy link
Contributor Author

@tarsius Thank you! But ever since I disabled magit-backup-mode, I haven't had any issues with speed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unconfirmed Maybe a bug, but unable to reproduce support User needs some help
Development

No branches or pull requests

4 participants