Michael Olson, 2007-08-24:

> Matthieu Moy <[EMAIL PROTECTED]> writes:
> 
>> As for your idea, perhaps `set-process-filter' could help, too.
> 
> When doing that, I think it may still be possible to catch log output
> mid-line or mid-stanza.

Yes.


> To solve that, I would have to insert output
> accumulatively into a buffer anyway.

Yes, that is the simplest approach.  You could also delete each 
line/stanza could from that buffer as soon as it has been processed.


> So a filter function would be completely unnecessary.

But what is the advantage of polling for input every 0.3s?  There's 
still no guarantee that a complete line or stanza (or any input 
whatsoever) will have arrived.

On a slow machine or under very high load, git may have to wait for I/O 
for several seconds, so activating Emacs to look for new input every 
0.3s would be way too often.  On a fast dual-core machine, a delay of 
0.3s before beginning parsing is redundant since it would just leave one 
of the cores idle and the user waiting.

A process filter function avoids this problem since it lets the 
operating system scheduler decide at what intervals Emacs should be 
activated.  That is what these mechanisms are for.  A solution based on 
process filter functions will also be simpler to implement, since there 
will be no need to manage timers.

Christian.

_______________________________________________
Dvc-dev mailing list
[email protected]
https://mail.gna.org/listinfo/dvc-dev

Reply via email to