Making magit more performant for large git repositories

97 views
Skip to first unread message

ncale...@gmail.com

unread,
May 2, 2013, 6:42:24 PM5/2/13
to ma...@googlegroups.com
Hello all,

I use magit to interact with github.com/mozilla/mozilla-central, a fairly large repository, and it is a poor experience.  My beefy laptop with an SSD regularly janks for 10-30 seconds on synchronous git invocations.  I would like to improve the magit experience.

I have several patches under development to make magit performant, and I would love testers and reviewers.  For example, [1] speeds up branch-guessing significantly for me.  I also have patches in the works to

* add a mode-line indicator during refresh;
* cache some frequent git invocations;
* make displaying tree-graph output in logs an option (this is very slow on large repositories);
* log git invocations, outputs, and record running times (so that we can profile magit more effectively);
* make sections not be refreshed automatically.

These almost make magit useable with mozilla-central.  If you're interested in any of these approaches, or have other requests or ideas for making magit speedier, please let me know [2].

Yours,
Nick Alexander

[1] https://github.com/magit/magit/pull/636

[2] A few things I think are not feasible:

It appears to me that magit essentially does not cache.  This is most evident in `magit-refresh-buffer', which tears down all sections and synchronously invokes git to repopulate everything.  (There is a small sop to maintaining `needs-refresh' state for diffs.)  I was surprised, at first, but this seems like an excellent decision: git can cache better than magit can, and this makes running magit in multiple repositories transparent.

magit does not do much refresh work asynchronously.  Changing refresh to invoke git asynchronously would be a significant reworking of the section internals, to my eye, so I would not propose such changes.

Philip Weaver

unread,
May 2, 2013, 6:45:14 PM5/2/13
to ncale...@gmail.com, ma...@googlegroups.com
I was just looking at this problem today. magit-status is getting slower and slower each day for one of my repos. Sign me up to be a tester.



--
 
---
You received this message because you are subscribed to the Google Groups "magit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to magit+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

William Xu

unread,
May 8, 2013, 10:59:15 AM5/8/13
to ma...@googlegroups.com
ncale...@gmail.com writes:

> Hello all,
>
> I use magit to interact with github.com/mozilla/mozilla-central, a fairly large
> repository, and it is a poor experience. My beefy laptop with an SSD regularly
> janks for 10-30 seconds on synchronous git invocations. I would like to improve
> the magit experience.

Same here, especially magit-refresh is too slow, much slower than plain
git on large repo. For my repo, plain `git status' takes 2 to 3
seconds, then in magit, it would be like 6 or 8 seconds. I also noticed
magit-refresh is doing a few operations repeatively.

> I have several patches under development to make magit performant, and I would
> love testers and reviewers. For example, [1] speeds up branch-guessing
> significantly for me. I also have patches in the works to
>
> * add a mode-line indicator during refresh;
> * cache some frequent git invocations;
> * make displaying tree-graph output in logs an option (this is very slow on
> large repositories);
> * log git invocations, outputs, and record running times (so that we can profile
> magit more effectively);
> * make sections not be refreshed automatically.
>
> These almost make magit useable with mozilla-central. If you're interested in
> any of these approaches, or have other requests or ideas for making magit
> speedier,

Do you have a branch that i can clone and test?

--
William

http://xwl.appspot.com

Reply all
Reply to author
Forward
0 new messages