Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: for the plan.

Jump to: navigation, search


< CDT‎ | designs‎ | PDOM

History of CDT Indexing

In the beginning there was an indexer based on the ctags utility that is commonly available. This indexer would run ctags on the contents of projects and create an in memory database of the symbols. Being in memory proved to be a bad thing with large projects and this indexer was eventually turned off.

ctags also suffered from a lack of accuracy, especially with macro'd code. It also does not record cross references. The team at IBM decided to adapt the C/C++ parser they were building to generate an index as well. Most of the storage and search facilities were borrowed from the JDT's index. The on disk index with in memory cache proved to have good performance writing and searching the contents of the index.

Where this index had issues was the performance of the C/C++ parser to generate the contents of the index. The parser is a full blown C/C++ parser that replicates the parsers that are used in compilers. As a result, this parser exhibits the same and up to two times worse performance of a compiler, resulting in poor index creation times.

As a workaround, the ctags indexer was re-introduced but used the underlying index framework of the new indexer. This resulted in very good performance, but again, suffered from ctags restrictions.

A new indexing strategy was required to provide full indexing information but at a reasonable performance cost.

Back to the top