[slim-vim] Listener callback function question

Brad Beveridge brad.beveridge at gmail.com
Tue Aug 15 10:18:51 CDT 2006


On 13/08/06, Brad Beveridge <brad.beveridge at gmail.com> wrote:
<SNIP>
> vectors in SBCL as fast as possible.  Uncommenting the DISASSEMBLE
> lines at the toplevel will really give you lots of output.  Lots of
> output really shows up that we need to work on the speed of our output
> to buffer functions.
>

So I got fed up with my lots-of-output test file taking a long time to
compile.  I wrote a simple profiler that instruments function
entry/exit (not yet checked in).  Not surprisingly, for a compile that
took 10 seconds, about 9.5 seconds of time was in the output
functions, either outputting to the REPL or the quickfix buffer.  What
was surprising was that most of that output time was spend in
VIM:FIND-BUFFER.  Why is this, you may ask?  Well,
BUFFER-UTIL:APPEND-LINES calls FIND-BUFFER.  This appears to me to be
the best low hanging fruit - what we really want to do is have our
vim-buffer-output-stream class have a method INTERNAL-BUFFER-OF, which
keeps track of result of FIND-BUFFER, and have our most basic
APPEND-LINES work with that.  I thought that would be a 10 minute fix
I could do this morning, but not so!  The type that FIND-BUFFER
returns is a FOREIGN-DATA, not a class :(
We could have a catch all APPEND-LINES that specialises on (buffer t),
but that feels like a hack really.

Any thoughts?  I'll probably go with the catch all solution to try and
improve speed initially, but I'd really like to have a VIM:RAW-BUFFER
type I think.  But I don't really know how to do that :)

Cheers
Brad


More information about the slim-vim mailing list