When fixing bug 1241767 upstream, it was found that get_enterable_products() is extremely slow for logged out users. We should find out why this is the case and fix it.
Which pages will this impact?
(In reply to Jason McDonald from comment #1) > Which pages will this impact? show_bug.cgi and enter_bug.cgi
I've been testing this and I don't think it's a bug. The extra cost appears to be connecting to the DB. The way this test is constructed a logged in user will already have a connection as they have accessed the profiles table, whereas a logged out user hasn't done that so needs to start up a connection. I've timing around Bugzilla->dbh in sub get_enterable_products and running the tests as per https://bugzilla.mozilla.org/show_bug.cgi?id=1183492#c9 $ perl -Mlib=lib -MTime::HiRes -MBugzilla -MBugzilla::User -wE 'my $user = Bugzilla::User->new(1); $user->groups_as_string; my $t0 = Time::HiRes::time(); my $groups = $user->get_enterable_products; my $t1 = Time::HiRes::time(); say $t1 - $t0' 2.86102294921875e-06 0.0195839405059814 $ perl -Mlib=lib -MTime::HiRes -MBugzilla -MBugzilla::User -wE 'my $user = Bugzilla::User->new(0); $user->groups_as_string; my $t0 = Time::HiRes::time(); my $groups = $user->get_enterable_products; my $t1 = Time::HiRes::time(); say $t1 - $t0' 0.0166680812835693 0.0258760452270508
Bug was closed upstream after feedback above was posted there.