launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #04021
[Merge] lp:~wgrant/launchpad/unbreak-guesspackage-slowness into lp:launchpad
William Grant has proposed merging lp:~wgrant/launchpad/unbreak-guesspackage-slowness into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #800485 in Launchpad itself: "timeout changing sourcepackage names in bugs"
https://bugs.launchpad.net/launchpad/+bug/800485
For more details, see:
https://code.launchpad.net/~wgrant/launchpad/unbreak-guesspackage-slowness/+merge/65433
https://wiki.canonical.com/IncidentReports/2011-06-22-LP-changing-sourcecpackagenames-regression
Yay, archive joins are slow. This branch reverts to using the precalculated all_distro_archive_ids. Tested on staging, and being cowboyed.
--
https://code.launchpad.net/~wgrant/launchpad/unbreak-guesspackage-slowness/+merge/65433
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/unbreak-guesspackage-slowness into lp:launchpad.
=== modified file 'lib/lp/registry/model/distribution.py'
--- lib/lp/registry/model/distribution.py 2011-06-21 16:31:56 +0000
+++ lib/lp/registry/model/distribution.py 2011-06-22 02:21:29 +0000
@@ -1395,9 +1395,8 @@
# effort to find a package.
publishing = IStore(SourcePackagePublishingHistory).find(
SourcePackagePublishingHistory,
- SourcePackagePublishingHistory.archiveID == Archive.id,
- Archive.distribution == self,
- Archive.purpose.is_in(MAIN_ARCHIVE_PURPOSES),
+ SourcePackagePublishingHistory.archiveID.is_in(
+ self.all_distro_archive_ids),
SourcePackagePublishingHistory.sourcepackagereleaseID ==
SourcePackageRelease.id,
SourcePackageRelease.sourcepackagename == sourcepackagename,
@@ -1428,9 +1427,8 @@
# the sourcepackagename from that.
bpph = IStore(BinaryPackagePublishingHistory).find(
BinaryPackagePublishingHistory,
- BinaryPackagePublishingHistory.archiveID == Archive.id,
- Archive.distribution == self,
- Archive.purpose.is_in(MAIN_ARCHIVE_PURPOSES),
+ BinaryPackagePublishingHistory.archiveID.is_in(
+ self.all_distro_archive_ids),
BinaryPackagePublishingHistory.binarypackagereleaseID ==
BinaryPackageRelease.id,
BinaryPackageRelease.binarypackagename == binarypackagename,