[00:14] <cjwatson> wgrant: Somewhere there is existing code that produces a modified field for some page or other for admins, because they have far too many options to use the normal vocabulary sensibly.  Does that ring a bell and if so do you remember where it is?
[00:14] <cjwatson> My grepping isn't turning up anything.
[00:17] <wgrant> cjwatson: Project owner maybe?
[00:17] <wgrant> No, branch owner
[00:17] <wgrant> I think
[00:18] <cjwatson> Ah yeah, could be
[00:18] <wgrant> cjwatson: CodeEditOwnerMixin
[00:18] <cjwatson> Though maybe this isn't a problem in the case at hand.  For some reason in https://oops.canonical.com/?oopsid=OOPS-bdc9d2c557980f1cad47c5bc49c51a86 BuildableDistroSeries.findSeries is deathspiralling (fair enough) but target_ppas_vocabulary isn't (weird)
[00:19] <cjwatson> Fixing the former is easy enough so maybe I'll just try that and only fix the latter if it's demonstrably a problem
[00:20] <wgrant> cjwatson: Does it get to the point where it would even materialise the latter?
[00:20] <cjwatson> Yes - make_archive_vocabulary does that
[00:20] <wgrant> Hmm
[00:20] <cjwatson> Iterates through all the archives and does archive.reference etc.
[00:21] <cjwatson> four million people and <100000 archives though, so maybe it gets away with it somehow
[00:22] <cjwatson> I'd have expected materialising 100000 archive rows to be worse than 300ms though.
[00:24] <cjwatson> And the resulting page must be terrible ...
[00:25] <wgrant> It is weird, unless set is taking forever for some reason on a set of 100000 identical Storm objects.
[00:25] <wgrant> Which doesn't seem entirely likely.
[00:26] <cjwatson> And anyway that would explain findSeries being slower, which I already thought was clear enough, but not target_ppas_vocabulary being mysteriously fast.
[00:29] <cjwatson> Oh well, maybe I'll see if an OOPS with the first thing fixed shows any big differences.
[00:31] <cjwatson> If it does then there's still room to bulkify the vocabulary construction for people like us who merely have a couple of thousand usable PPAs, and do something like CodeEditOwnerMixin for admins.