[Emacs-ada-mode] gpr files

Stephen Leake stephen_leake at stephe-leake.org
Mon Dec 4 18:06:07 PST 2006


I have one problem with the gpr file integration; it's slow.

Running 'gnat list -v -Pgds_test.gpr' on one of my main current
projects takes 15 seconds, when none of the files are in cache. It
takes a noticable amount of time (2 seconds?) when all the files are
in cache.

'gnat list -v' outputs information on every file in the project; I
suspect that is what takes all the time. We only want the path
information; we throw away the rest.

So I resurrected gpr2adp, renamed it to gnatpath, and changed it to
output the same info in the same format as 'gnat list -v'. That takes
less than 2 seconds when the files are not in cache, and negligible
time when the files are in cache; much better.

'gnatpath' acepts the same argument list as 'gnat' (ie "list -v
-Pfile.gpr"), but only uses the project file. I did it that way so it
is a direct replacement for 'gnat' in this one application.

I added a customize variable to let the user choose 'gnat' or
'gnatpath'.

I haven't posted this yet; is anyone interested?

One option here is to get AdaCore to add command line options for
'gnat' to do this, rather than making us use 'gnat list -v', or
providing a separate 'gnatpath' executable.

Emmanuel; is this speed issue enough to get AdaCore to enhance 'gnat'?

-- 
-- Stephe



More information about the Emacs-ada-mode mailing list