Revision 386b739...
Go back to digest for 23rd March 2014Optimization in Development Tools
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
- modules/ksb/KDEXMLReader.pm