Closed Bug 617859 Opened 9 years ago Closed 9 years ago

Cache recommended add-ons list for Start page to improve responsiveness

Categories

(Firefox for Android Graveyard :: General, defect)

x86
macOS
defect
Not set

Tracking

(fennec2.0b4+)

VERIFIED FIXED
Tracking Status
fennec 2.0b4+ ---

People

(Reporter: mfinkle, Assigned: blassey)

References

Details

Attachments

(1 file)

Loading the recommended add-ons can hurt UI responsiveness. Because the add-on query uses SSL we initialize all of NSS, which is slow. By caching the list and updating it a appropriate times, we can improve UI responsiveness at startup.
tracking-fennec: --- → ?
tracking-fennec: ? → 2.0b4+
Attached patch patchSplinter Review
Assignee: nobody → blassey.bugs
Attachment #496748 - Flags: review?(mark.finkle)
also.  maybe a follow up.  we can use ask webdev to look into the possibility of serving recommendations over http.
Blocks: 601186
Comment on attachment 496748 [details] [diff] [review]
patch


>     var RecommendedSearchResults = {

We can rename this RecommendedAddons

>+      readFile: function(aFile) {
>+        try {
 <snip>
>+      },

indent problems

>+      fillInAddons: function(aAddons, aAddonCount, aTotalResults) {

fillInAddons -> loadAddons

>         let loading = document.getElementById("loadingAddons");
>-        loading.parentNode.removeChild(loading);
>+        if (loading)
>+          loading.parentNode.removeChild(loading);
>+       
>+        list.innerHTML = "";

I think | list.innerHTML = "" | will remove the "loading" stuff for us

>diff --git a/components/AddonUpdateService.js b/components/AddonUpdateService.js

>+var RecommendedSearchResults = {
<snip>
>+}

indent problems

I can tweak and land. I do think we can reduce the delay time from 10 seconds, but we'll land it first and see what issues we have.
Attachment #496748 - Flags: review?(mark.finkle) → review+
pushed with tweaks:
http://hg.mozilla.org/mobile-browser/rev/968dfb2d8b6f
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Mark, do we have a test to check the caching?   Also, will ask waverley to verify this when they are running the performance startup tests against beta 3  (assuming this landed in time for beta 3)
Flags: in-testsuite?
 This didn't land for beta 3
Can you provide some steps to reproduce, please?
(In reply to Brad Lassey [:blassey](On vacation 8/22-9/20) from comment #6)
>  This didn't land for beta 3

Have it landed since FF 4 beta 3? Running a performance startup test will it be enough to verify this bug?
Looking for "recommended-addons.json" in your profile folder will be a good indicator too.
(In reply to Mark Finkle (:mfinkle) from comment #9)
> Looking for "recommended-addons.json" in your profile folder will be a good
> indicator too.

It seems that "recommended-addons.json" is present in my profile folder on the latest Nightly build. I'll mark this bug as verified fixed.

--
Mozilla/5.0 (Android;Linux armv7l;rv:9.0a1)Gecko/20110911
Firefox/9.0a1 Fennec/9.0a1
Device: Motorola Droid 2
OS: Android 2.3
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.