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

use ng_async for magit blame #425

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

brotzeit
Copy link
Member

I started another try to improve the performance of magit blame. This time I used a subprocess instead of libgit. Instead of doing everything in the main thread this implementation makes use of ng_async for parsing the blame output and additionally get the buffer positions for blame chunks. The latter takes most of the execution time of regular magit blame when using it in large buffers.

However I noticed that emacs can't handle the speed of the incoming chunks when trying to create the overlays for the whole file(at least for big files).

That's why I added a hook for window-scroll-functions so every time the window positions change the overlays are created for the visible part of the buffer. This seems to work well, but it's probably necessary to apply some optimizations to make it more stable.

I think ng_async provides lots of possibilities to improve performance even if we can't use LispObject in rust threads.

These changes allow parsing of git blame output in a rust
thread. Additionally, the buffer positions for the blame chunks
will be looked up asynchronously. However most of the functions
defined in magit-blame.el are still in use.
@harryfei
Copy link
Member

I have give a it a fast and non-serious review.

I just want to remind you that there still not be dirty commented code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants