Drastically improve the speed of #'sy-git-blame
authorSteve Youngs <steve@sxemacs.org>
Fri, 27 Oct 2017 02:00:02 +0000 (12:00 +1000)
committerSteve Youngs <steve@sxemacs.org>
Fri, 27 Oct 2017 02:08:45 +0000 (12:08 +1000)
commit5738454e73e943dc38669013226537a86d7f7058
tree39401d7690417ebe6f950cc93507258c3c401e04
parent625015e8090e8a8ebde66164826be70c51f72cb7
Drastically improve the speed of #'sy-git-blame

In the previous iteration of #'sy-git-blame there was 2 calls to git,
plus creating an extent and glyph for every single line in the file you
were blaming.  It took FOREVER even on small files.  Now there is 1 git
call per revision, blank lines and uncommitted lines are skipped, and
unique extents are only created once per revision, with the rest (vast
majority) being created as "child-extents" with `set-extent-parent'.

Please note that even with this speed-up blaming a large file can still
take some time, but now we're talking seconds and not minutes.

* sy-git.el (sy-git-process-blame-buffer): Rewrite, dramatically
increasing speed.
(sy-git-blame): Use '--root' to treat boundary commits as normal
commits.

Signed-off-by: Steve Youngs <steve@sxemacs.org>
sy-git.el