[mcclim-devel] find-keystroke-item slowness

Cyrus Harmon ch-mcclim at bobobeach.com
Thu Jan 27 08:29:46 UTC 2005


Ok, here's where I admit to not really knowing how to use a profiler 
for lisp code :-). But, keystroke processing seems like a pretty 
fundamental part of what an editor needs to do.

70 wpm ~= 400 char/min = 6 char/sec. We're looking at ~100 things on 
the list per char, so we're doing roughly 1000 comparisons per second. 
Not good.

Admittedly, (time ...) doesn't show that this isn't a bottleneck, but 
something somewhere between pressing the keystrokes and displaying the 
corresponding characters is slow. Plus, we're apparently (with openmcl 
at least) 500 bytes or so per trip through here. If I type 1000 
characters, I've just consed up 500kb of stuff I need to GC? I guess 
memory allocation is fast, and the GC quick too, but it seems like we 
could be doing a hash lookup here and not consing.

If you've got better places for me to look for the bottlenecks between 
typing and display, let me know.

Thanks,

Cyrus

On Jan 26, 2005, at 8:52 PM, Robert Strandh wrote:
> I seriously doubt that find-keystroke-item is the source of your
> problem.  While you are right, that it is doing a sequential search,
> it does so at interaction speed which is thousands of times slower.
>
> Have you profiled it to be sure that this is really the source of the
> poor response?




More information about the mcclim-devel mailing list