Last Comment Bug 960597 - Extension check UI fetches add-on update info twice
: Extension check UI fetches add-on update info twice
Status: NEW
: perf
Product: Toolkit
Classification: Components
Component: Add-ons Manager (show other bugs)
: unspecified
: All All
-- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
: Andy McKay [:andym]
Mentors:
Depends on: 760356 772484
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-16 09:00 PST by :Irving Reid (No longer working on Firefox)
Modified: 2015-08-09 05:30 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description User image :Irving Reid (No longer working on Firefox) 2014-01-16 09:00:00 PST
In the UI that checks for add-on updates when Fx is upgraded to a new version, we call addon.findUpdates twice for add-ons to be updated; once at https://hg.mozilla.org/mozilla-central/annotate/5f3776437298/toolkit/mozapps/extensions/content/update.js#l170 for every add-on, and again at https://hg.mozilla.org/mozilla-central/annotate/5f3776437298/toolkit/mozapps/extensions/content/update.js#l259 for those that we decide need to be updated. Since this call involves a network request, we should do it at most once per add-on.
Comment 1 User image :Irving Reid (No longer working on Firefox) 2014-01-16 09:07:15 PST
I suspect this crept in during the change from old to new API in bug 557956, where the old em.update(... nsIExtensionManager.UPDATE_SYNC_COMPATIBILITY...) was changed to forall(addons) addon.findUpdates() at https://hg.mozilla.org/mozilla-central/diff/ab6e93fb7fec/toolkit/mozapps/extensions/content/update.js#l1.179, and then later changes added back the compatibility sync via AddonRepository.repopulateCache() but kept the ...findUpdates().
Comment 2 User image Dave Townsend [:mossop] 2014-01-16 10:19:34 PST
No, we always used to do the update check twice because IIRC the old API could only return compatibility or update information not both. We were just in such a rush to get Firefox 4 done that we didn't fix this up tthen.

Note You need to log in before you can comment on or make changes to this bug.