Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "CDT/designs/PDOM"

< CDT‎ | designs
Line 1: Line 1:
 
* [[History]]
 
* [[History]]
 
* [[Overview]]
 
* [[Overview]]
=== 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.
 
 
=== Strategy behind the PDOM ===
 
 
The main objective of the PDOM is to use the C/C++ parser but to only parse each file, including header files, only once. This means persisting the declarations and references in the header files for use by later parses.
 
 
to be continued...
 

Revision as of 16:52, 28 March 2006

Back to the top