Ah wtf, look at this commit I have locally on the branch:
commit 1921afa139aa8459d70d51966e010f1093329701
Author: Iain Lane <iain.lane@canonical.com>
Date: Wed Feb 1 17:54:07 2017 +0000
engine: Process base suite packages for contents only
We don't need to do any further processing of base suite packages -
they're only needed to find icons, and we get that from their contents
alone.
This should stop base suite packages being scanned every time.
If a base suite is later a real suite then everything should continue to
work.
Fixes #33.
diff --git a/src/asgen/engine.d b/src/asgen/engine.d
index c5ccf93..16abca7 100644
--- a/src/asgen/engine.d
+++ b/src/asgen/engine.d
@@ -182,9 +182,26 @@ public:
// get contents information for packages and add them to the database
auto interestingFound = false;
+
+ if (!suite.baseSuite.empty) {
+ // First get the contents (only) of all packages in the base suite.
+ logInfo ("Scanning new packages for base suite %s/%s [%s]", suite.baseSuite, section, arch);
+ auto baseSuitePkgs = pkgIndex.packagesFor (suite.baseSuite, section, arch);
+ foreach (ref pkg; parallel (baseSuitePkgs, 8)) {
+ immutable pkid = pkg.id;
+
+ string[] contents;
+ if (!cstore.packageExists (pkid)) {
+ contents = pkg.contents;
+ cstore.addContents (pkid, contents);
+ logInfo ("Scanned %s for base suite.", pkid);
+ }
+ }
+ }
+
+ // And then scan the suite itself - here packages can be 'interesting'
+ // in that they might end up in the output.
auto pkgs = pkgIndex.packagesFor (suite.name, section, arch);
- if (!suite.baseSuite.empty)
- pkgs ~= pkgIndex.packagesFor (suite.baseSuite, section, arch);
foreach (ref pkg; parallel (pkgs, 8)) {
immutable pkid = pkg.id;
I guess that I forgot to push this before merging the branch :(
Thanks for fixing! Actually it doesn't affect Ubuntu as I generated the config so that all suites have base suites.
On Tue, Feb 14, 2017 at 09:14:47AM -0800, Matthias Klumpp wrote:
How does that work? Which base suite does the `zesty` suite have?
Everything has the base suite of 'zesty'. It doesn't seem to cause any
problems - with this patch now the contents are processed in one pass,
but AFAIK that's alright.
I wonder if processing in one go is faster... But given the general slowness of the extraction process, I assume the cost of creating and trashing a few threads is negligible (the rest of the data should have been cached and be reused)
iainlane repliedFeb 13, 2017
Ah wtf, look at this commit I have locally on the branch:
I guess that I forgot to push this before merging the branch :(
Thanks for fixing! Actually it doesn't affect Ubuntu as I generated the config so that all suites have base suites.
ximion repliedFeb 14, 2017
Ah, that explains it! I was doubting myself because I would have sworn that the line was there when I reviewed the patch :D
How does that work? Which base suite does the
zestysuite have?iainlane repliedFeb 14, 2017
ximion repliedFeb 14, 2017
Jup, that is indeed fine - weird, but fine ^^
I wonder if processing in one go is faster... But given the general slowness of the extraction process, I assume the cost of creating and trashing a few threads is negligible (the rest of the data should have been cached and be reused)