Revision 5c67406...

Go back to digest for 11th September 2011

Optimization in Development Tools

Milian Wolff committed changes in [kdevplatform] language/backgroundparser/parsejob.cpp:

optimize: only use ForegroundLock in ParseJob::readContents when really required

We now use a variant of the double-checked-initialization pattern, as the
trackerForUrl should be threadsafe according to its apidox. Only when we have
a tracker do we need to get the foreground lock.

When opening a project, the majority of files won't be opened in the editor,
and all others can thus be parsed/read without requiring a ForegroundLock

In my benchmarks (using the free non-commercial edition of VTune) this improved
the performance of a duchainify run by 25% or ~10s.

File Changes

Modified 1 files
  • language/backgroundparser/parsejob.cpp
1 files changed in total