[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch to make VC annotate async
From: |
Tom Tromey |
Subject: |
Re: Patch to make VC annotate async |
Date: |
Sun, 24 Jun 2007 15:32:00 -0600 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.990 (gnu/linux) |
>>>>> "Stefan" == Stefan Monnier <address@hidden> writes:
>> * vc.el (vc-annotate-display-select): Don't pop to buffer if one
>> is specified.
>> (vc-annotate): Run vc-annotate-display-select via vc-exec-after.
Stefan> Oh, so you don't even add the coloring until after the whole data
Stefan> was received. Hmmm...
Yes. This seemed like the simplest change, and after trying it a bit
I felt that it didn't make the user interface unacceptably odd. The
weirdest bit is when point moves, but that is nice once you adjust to
it.
I also experimented a bit with how the buffer is displayed. In
particular I tried making it so that the buffer is displayed only
after the contents are fontified. I didn't like this since it means
the buffer is hidden while I do other tasks; popping it immediately is
less intrusive -- when the buffer is initially hidden I found that I
could sometimes context switch and forget that I had asked for the
annotation.
Also, in my various tests, I find that the buffer contents actually
show up reasonably quickly. The slowdown with svn seems to come while
computing the text to send; once sent it seems to arrive quickly
enough that I don't notice the contents not being fontified.
>> * vc-cvs.el (vc-cvs-annotate-output): New variable.
>> (vc-cvs-annotate-process-filter): New function.
>> (vc-cvs-annotate-command): Run command async. Use
>> vc-cvs-annotate-process-filter.
Stefan> I don't understand the prupose of
Stefan> vc-cvs-annotate-process-filter. In my implementation I
Stefan> haven't needed any change to vc-cvs.el other than passing the
Stefan> `async' flag to vc-do-command.
The CVS annotator strips some text from the front of the buffer. I
chose this approach since it means the user will not see the text
being stripped. But, since the text does show up so quickly, and
since the code would be simpler, I could change this to a simple
vc-exec-after if you like.
Tom