Revision 386b739...

Go back to digest for 23rd March 2014

Optimization in Development Tools

Michael Pyne committed changes in [kdesrc-build] modules/ksb/KDEXMLReader.pm:

kde-projects: Try to optimize kde_projects.xml handling.

I have a fairly large kdesrc-buildrc, and simply doing a
"kdesrc-build --pretend kcalc" (where kcalc is not directly mentioned in
the config file) was taking 32 seconds to complete, since kdesrc-build
would have to go through each possible kde-projects source of kcalc,
and XML-expand it, in order to find kcalc.

Before this fix, each XML-expansion read the whole XML file looking for
modules matching the search string. Then, everything about the XML file
was completely forgotten.

Now the XML file is read only one time, and every possible kde-projects
module is remembered. We then filter the list of modules each time
there's a request. We can probably optimize this still further, but this
alone is enough to get me down to 3-4 seconds locally.

My KF5 installation doesn't show anywhere near as much improvement (but
then it didn't have anywhere near as many different use-modules entries)
so YMMV.

File Changes

Modified 1 files
  • modules/ksb/KDEXMLReader.pm
1 files changed in total