> It would help if you send me the big file, so I can do some profiling > etc. > > I can sign a non-disclosure agreement if necessary. I'm not working for > a company any more, if that was an issue. For sure, it is easier with the code, but I am afraid that arranging the necessary agreement will not be easy/will take a significant time. I will see what can be done. In the meantime, I suppose that other big files (e.g. gnatcoll-projects.adb) are representative enough to work on performance.
> > I guess that the indentation of the last line typed only depends on > > what is before the cursor, not what is after. > > No, since it implies a full parse. I mean : "functionally, deciding on the indentation does not depend on the lines after the cursor". Of course, if indentation algorithm is based on a full parse result, it depends on the full unit. But with my very limited knowledge of indentation problem, I do not see a case where the indentation at the cursor position cannot be decided (always ? most of the time?) only by looking at what is before the cursor. > I'm experimenting with caching the parser state. If I can preserve the > parser state before and after each edit, then only the edited code is > actually parsed, which will solve the "indent after edit" speed problem > (which is _not_ the "indent while edit" problem, unfortunately). > > The first parse would still be slow; would that be a tolerable solution? Do not know. It depends when the parser will kick in, and how long the parsing will take. E.g. when navigating in sources, one can very quickly have a few files being loaded (e.g. when doing C-c C-d to go to spec, then body, then to other spec, etc). (we should re-check the speed with the latest version, but have an editor blocking during a few seconds for each file even once at an "unexpected" moment is not very nice). > Is Ada mode 4.1 not a good workaround? It's not for me, because I'm > using Ada 2012 features whenever I can. For the moment, 4.1 is a workable solution for us. But same as for you, the more Ada 2012 we will use, the less the old ada mode will be usable. And for sure, we would like to benefit from the new nice ada-mode features one day or another :). Maybe a solution to performance and interactive indentation (and maybe have other nice things such as a much faster C-c C-r) is to interface to a gps "library" or "gps backend process". It might decrease the long term maintenance effort for Ada mode (by re-using code shared between gnatbench, gps and emacs adamode). 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
