Closed
Bug 1079681
Opened 10 years ago
Closed 10 years ago
separate waffle switch from consumer info endpoint. cache consumer info responses and make them asynchronous requests past first run
Categories
(Marketplace Graveyard :: Code Quality, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1038936
People
(Reporter: kngo, Assigned: kngo)
Details
Fireplace blocks on consumer info for user region information and such. Consumer info is the only thing Fireplace blocks on. Recently, mainly with the integration of Firefox Accounts, we added waffle switches to Fireplace. Since we didn't want to block on a waffle switch request as well, it was shoved into consumer info. Combining waffle switches and consumer info causes a nightmare of JS dependency issues between Commonplace projects. Since every project will need to upgrade to get Firefox Accounts, that'd mean it'd have to read the waffle switches. That means we have to pull in consumer info into other projects despite being a Fireplace-specific module. And worse, consumer info depends on mobilenetwork.js, another very Fireplace-specific module. We don't want to be copying modules across several Commonplace projects just for a waffle switch that we'll turn off right after launch. So we can separate the waffle switch into its own endpoint and module. We can have it block the page load ONLY on the first run with a clear cache. On subsequent page loads, we update the waffles in the cache asynchronously. We can do the same with consumer info, which one of the biggest contributors to slow launch times.
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → kngo
Comment 1•10 years ago
|
||
See also https://bugzilla.mozilla.org/show_bug.cgi?id=1038936 In addition, note that we already should be caching consumer_info and refreshing it in the background, using the offline cache mechanism: https://github.com/mozilla/fireplace/blob/master/src/media/js/settings.js#L76 Also, for the record, consumer_info could, maybe, not depend on mobilenetwork.js, it only depends on it in order to be sure that SIM detection happens before consumer_info is loaded, so that region detected from the SIM is not overridden by consumer_info.
Assignee | ||
Updated•10 years ago
|
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•