Closed Bug 1430495 Opened 2 years ago Closed 2 years ago

Make loading of Requests dropdown faster

Categories

(bugzilla.mozilla.org :: Extensions, enhancement)

Production
enhancement
Not set

Tracking

()

VERIFIED FIXED

People

(Reporter: kohei, Unassigned)

References

Details

(Keywords: perf)

Attachments

(1 file)

Currently the Requests dropdown content is loaded once the user clicks the red badge. While it's quite fast on the local development server, it's slow on BMO because of the large database. I'd like to make it faster. Solutions:

1. Load the content once the page is loaded. It's an option if many people opens the dropdown. Given that the request involves a relative complicated SQL query, it should be basically avoided.

2. Load the content once the badge is hovered or focused. It's the same technique as the tab warming functionality that will soon be enabled in Firefox (Bug 1423220). The users may still see the "Loading..." label, but it's better than the click-to-load handler.

The first solution requires a proof using event tracking with Google Analytics. I'll take the second approach this time.
Let me profile this, I bet I can make it a lot faster. :)
A server-side perf enhancement would be great for sure :)
It's not that big sql query -- that takes 8ms. It's a bunch of other stuff.
Probably better for me to just write the new end point, but I'm going look at this report a bit -- after I walk my dog.


https://dylan.hardison.net/pub/nytprof/2018-01-14/requests-cgi/
Component: User Interface → Extensions: Review
PR landed to master.
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Attachment #8942534 - Flags: review?(dylan) → review+
LGTM on production.
Status: RESOLVED → VERIFIED
Assignee: kohei.yoshino → nobody
Component: Extensions: Review → Extensions
You need to log in before you can comment on or make changes to this bug.