#4 unique files & --line-directives

open
nobody
None
5
2001-11-08
2001-11-08
Anonymous
No

[ctags5.1]

Using --line-directives one can let ctags catalogue
C/C++ preprocessor output files. These files generally
contain the same #include files over and over again.

ctags wastes valuable time and space processing the
same contents repeatedly. Duplicate symbol tags are
only removed on the final sort.

The attached patch eliminates this by adding a file
lookup table and keeping track of the max line number
(recursive #includes) and ensuring unique file
fragment processing.

In a real example (the KDevelop project) this reduces
processing time from 41s to 12s and eliminates some
29'000 duplicate tags up front.

TODO:

Add option to switch this on/off.

BUGS and LIMITATIONS:

The method does not work correctly if the #defines
for conditional compilation (#ifdefs) is used to
switch on/off fragments of #include headers and is not
identical between different source files.

-- Mark
mailto:markus.kuehni@trilab.ch

Discussion

  • Markus Kühni

    Markus Kühni - 2001-11-09

    Logged In: YES
    user_id=225544

    Hmmm...
    Sourceforge seems to throw me out prematurely and does not
    accept my files for upload.

     
  • Darren Hiebert

    Darren Hiebert - 2001-12-22
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks