Revision ca30fe5...

Go back to digest for 8th December 2013

Optimization in Development Tools

Milian Wolff committed changes in [kdevplatform] language/duchain/identifier.cpp:

Optimize: Cache data for empty {Qualified,}Identifiers.

Even on a smallish project (GammaRay), Identifier() is called ca.
567600 times, whereas QualifiedIdentifier() is even called 2257000
times.

Up until now, each object construction lead to a call to
ItemRepository::item which internally uses mutex locks as well as
the item repository hash lookup to find the item.

Instead, we now allocate a static const object on the stack and
reuse that for empty {Qualified,}Identifiers and thereby speed up
this codepath tremendously.

File Changes

Modified 1 files
  • language/duchain/identifier.cpp
1 files changed in total