Revision 777974
Go back to digest for 24th February 2008Optimization in Development Tools
Completely rework the way uses are stored and attached to their declarations.
1. Make uses extremely memory-efficient by reducing each use to 5 integers stored in a vector(range + declaration-index).
2. Manage the uses locally within the context that contains them, and hold a parallel vector that eventually contains smart-ranges when available.
That way we lose no memory for the 99.99% uses that don't have smart-ranges.
3. Like done with definitions, use an intermediate structure that uses the declaration-id for the mapping from declarations to uses. That way, we will never get problems from documents
parsed in multiple versions, the declarations all share the same uses.
Now we can actually start thinking about building uses for all parsed files(If it just was faster).
File Changes
- /trunk/KDE/kdevplatform/language/duchain
- /uses.cpp
- /uses.h
- /trunk/KDE/kdevplatform
- /language/CMakeLists.txt
- /language/duchain/declaration.cpp
- /language/duchain/declaration.h
- /language/duchain/declaration_p.h
- /language/duchain/declarationid.cpp
- /language/duchain/declarationid.h
- /language/duchain/definitions.cpp
- /language/duchain/duchain.cpp
- /language/duchain/duchain.h
- /language/duchain/duchainutils.cpp
- /language/duchain/duchainutils.h
- /language/duchain/ducontext.cpp
- /language/duchain/ducontext.h
- /language/duchain/ducontext_p.h
- /language/duchain/smartconverter.cpp
- /language/duchain/smartconverter.h
- /language/duchain/topducontext.cpp
- /language/duchain/topducontext.h
- /language/duchain/use.cpp
- /language/duchain/use.h
- /language/interfaces/icodehighlighting.h
- /plugins/duchainviewer/duchainmodel.cpp
- /plugins/usehighlight/usehighlight.cpp