[re-sending after subscribing to the list]
Hello,
Here at Eurocontrol, several developers tried the new Ada mode.
Two major problems (regressions compared to the Ada mode 4)
have been reported, blocking its adoption:
Performance problem
Indentation when editing code
Performance problem:
On big files, the performance is unacceptably slow.
On one of our biggest files, the initial loading/parsing of the file blocks the
emacs
during 10 seconds.
After that, typing some characters blocks the emacs during 7 seconds, after
which
the typed characters become visible
Further typing exhibits the same delay, each time the idle timer kicks in.
(above measured on a fast workstation).
Indentation when editing code:
Interactive editing is painful, as there is no
immediate indentation as long as the code is not syntactically complete.
We often have to modify existing code structure, introducing new constructs
or changing existing ones, so, during editing, the code is syntactically
incorrect
most of the time.
So, in such case, no indentation is done. Worse, indentation of some constructs
is occasionally undone, flushing the entire block to the left, as it becomes
incorrect
during editing.
I understand that Ada mode 5 is based on a new parser technique, which has a lot
of advantages. Maybe there is a way to still use this technique but solve the
above
blocking problems ?
Without knowing anything about the implementation, maybe the following could be
looked at:
For performance problem: maybe the parser code (or the code that starts the
parser) should
avoid parsing the complete file. It could maybe use an heuristic to start
parsing from some
nr of lines before Point. E.g. the heuristic could be : search a procedure or
package or ...
(whatever looks reasonable) up to xx lines before the Point, and then starts
parsing from there.
The parser should also stop parsing as soon as there is no need to continue
parsing to allow
edition at the current Point. Typically, when editing some piece of code, the
parsing could
stop at the end of the current procedure/package/...
For what concerns interactive edition: when the parser encounters an error,
rather than not do any indentation anymore, the parsing could be relaunched from
the starting parsing position (cfr above performance problem), but assuming
that just after Point,
we have an artificial "grammar token" that "properly completes" all the grammar
elements in
the parsed zone before the Point.
An example: Imagine I am typing:
procedure A is
begin
Another_Procedure_Call;
When typing the return after the begin, Ada mode 4 indents the code while
typing at
the expected position.
The new Ada mode could maybe obtain a similar effect by using this (or these
artificially introduced)
tokens.
Hoping the above might help to solve these blocking problems,
Philippe
____
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