Hello,

This posting is giving some additional thoughts with
reference to the 2 blocking problems in new ada-mode
discussed in June (namely, performance, and no indentation
while typing).

About the performance:
The gnat parser is very fast : 0.05 seconds to parse the big file
referenced in my initial posting (in syntax mode only).
Not too much idea how to measure the gps parser speed, but it looks
not noticeable (so probably below 0.1 second).

So, the new ada-mode parser is somewhat like 100 or more slower than
the above 2 parsers.
One reason might be the lisp, so rewriting it in C might help
as suggested by Stephen:
  "1) Rewrite parser in Ada (or C if necessary). I'm not sure how much this
      would gain; the lisp compiler is supposed to be pretty good."
As I understand, emacs has no real lisp compiler, but it has a byte compiler.
Byte compiled lisp is faster than interpreted lisp, but is far to be the
same as native compiled code.
See emacs lisp manual 'Performance of Byte-Compiled Code' as an example.

So, I guess the performance problem might be solved by rewriting the
parser (or the performance bottleneck) in C (if needed to integrate it in emacs)
(probably re-using the gps parser is not do-able unless it is
isolated in a separate process 'gnatparse', like 'gnatfind' ?)
How is gnatbench (the eclipse based ide) doing the indentation ?


About indentation while typing code:
I understand that a possible workaround is to change the editing
behaviour to use skeletons. It is however doubtful that all (or many?)
'lambda' users will find that attractive. At least at Eurocontrol, there
was (including me) close to zero enthusiasm for that workaround.
So, again as mentioned by Stephen, introducing (some) error recovery in
the parser might solve that.
Again, maybe the solution used by gps might be inspiring ?
Note that for interactive edition, we do not need a very intelligent/complete
error recovery: IMO, what is needed is correct indentation of the
line you are have just typed, based on the assumption that all preceding
lines are syntactically correct (up to the cursor).
I guess that the indentation of the last line typed only depends on
what is before the cursor, not what is after.
No idea if that simplifies the error recovery problem.

(note that the above 2 blocking problems mean that nice
features of the new ada-mode are not looked at: users are all
almost directly abandoning the new ada-mode once the performance
and no indentation while typing problems are encountered).

Thanks,

Philippe (still having some hope to use emacs in the future :)

____

This message and any files transmitted with it are legally privileged and 
intended for the sole use of the individual(s) or entity to whom they are 
addressed. If you are not the intended recipient, please notify the sender by 
reply and delete the message and any attachments from your system. Any 
unauthorised use or disclosure of the content of this message is strictly 
prohibited and may be unlawful.

Nothing in this e-mail message amounts to a contractual or legal commitment on 
the part of EUROCONTROL, unless it is confirmed by appropriately signed hard 
copy.

Any views expressed in this message are those of the sender.
_______________________________________________
Emacs-ada-mode mailing list
[email protected]
http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org

Reply via email to