Closed Bug 1430495 Opened 2 years ago Closed 2 years ago
Make loading of Requests dropdown faster
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/
I hope this is in keeping with my reputation: https://dylan.hardison.net/pub/nytprof/2018-01-14/requests-cgi/request-cgi-600-line.html https://dylan.hardison.net/pub/nytprof/2018-01-14/requests-cgi-faster/request-cgi-26-line.html There's a bit more I can do too.
2 years ago
Component: User Interface → Extensions: Review
2 years ago
Attachment #8942534 - Flags: review?(dylan)
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.