Feature request: Faster editor

5 views
Skip to first unread message

Marcio Mazza

unread,
Oct 18, 2009, 8:34:48 AM10/18/09
to cusp-development
Gorsal observed, in another thread, that the editor takes to long to indent code.
(see http://groups.google.com/group/cusp-development/msg/4c08c02ea05651ce)

If we base ourselves on the performance of the JDE, there should be no such long time for that operation.

I measured a delay of about 28s to indent a piece of about 2000 lines. That's too much.

To benchmark it I wrote some java code of about the same amount of lines. It took just 3s to format. So we can say that JDE is 10 times faster in that matter. And I remember that the format operation is more complex than the indent operation. The format also involves removing excess white space, for example. (In fact we could consider having a format instead of an indent... but that's another story.)

It would be nice if Cusp editor were faster.

(Acknowledgement observation: I remember that the intent of our requests is to make a better product. Thanks to the ones that contributed for its great quality so far.)

Gorsal

unread,
Oct 18, 2009, 1:37:19 PM10/18/09
to Cusp Development
I believe highlighting and selecting shift+tab also removes unwanted
white spaces. First, is it possible that you give me the code which
took approximatel 28 seconds? I have that length of code, but it
certainly doesn't take that long. I've timed asdf.lisp, which is
avaiable in lisp-extentions, and it took approximately 5 seconds to
indent the first time. the second time it took 1 second, showing that
replacing those white spaces is taking some times, which i'm guessing
it probably shouldn't. Asdf.lisp is aproximately 1383 lines. I'm
guessing my code changes to indent might be inefficient in some cases,
which is why i need such code. I would also be interested in seeing
how long it takes your computer to indent asdf.lisp, as my computer
might be faster than yours which is why it is taking longer? I guess
for real comparison, it would be nice if i had the java code to
compare the time, though that is not needed.
This is definitely a serious issue which i intent to resolve. Thanks!

Marcio Mazza

unread,
Oct 18, 2009, 2:46:18 PM10/18/09
to cusp-dev...@googlegroups.com
I have searched my eclipse/plugins directory and did not find any file named asdf.lisp. Can you point out where it is supposed to be?

I so downloaded a asdf.lisp from http://common-lisp.net/project/asdf/asdf.lisp.
It has 1994 lines and took 15s to indent with Shift+Tab.

(My environment: Cusp 1.0.414, Eclipse 3.5.0, Ubuntu Linux.)

2009/10/18 Gorsal <se...@tewebs.com>

Gorsal

unread,
Oct 18, 2009, 3:01:09 PM10/18/09
to Cusp Development
It is under plugins/jasko.tim.lisp/lisp-extensions. You have
downloaded the current-cusp-plugin file, described uner
http://wiki.github.com/Eyaro/ejasko.tim.lisp/getting?

Gorsal

unread,
Oct 18, 2009, 3:07:43 PM10/18/09
to Cusp Development
Oh, and I think i know why there is a discrepency between indenting
speeds the first and second times. It is probably because each time I
replace a line, i create a UI thread so i can access it. Obvious
solution would be to create a UI thread for the whole function, but
things aren't working out. I'm asking on the eclipse platform group
about it.

Marcio Mazza

unread,
Oct 18, 2009, 6:36:18 PM10/18/09
to cusp-dev...@googlegroups.com
Ok. I am using the original release, so the difference. But I think the benchmark with the Internet file might do. My computer is really slow, dunno why. But indeed that makes the measurement more precise. The thing is the difference between Java formatting time and Lisp indenting time seems too big (one order of magnitude).

To make a java file with 2000 lines I simply repeated a short dummy for statement many many times. Just that. I think that is enough for this sort of test.


2009/10/18 Gorsal <se...@tewebs.com>
Reply all
Reply to author
Forward
0 new messages