Closed
Bug 1387907
Opened 8 years ago
Closed 8 years ago
Store computed module data in the startup cache
Categories
(WebExtensions :: General, enhancement)
WebExtensions
General
Tracking
(firefox57 fixed)
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: kmag, Assigned: kmag)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
Computing this at startup takes several milliseconds. We can load the computed data from the startup cache virtually for free.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 3•8 years ago
|
||
mozreview-review |
Comment on attachment 8894370 [details]
Bug 1387907: Merge ext-browser.js and ext-utils.js.
https://reviewboard.mozilla.org/r/165544/#review170862
::: browser/components/extensions/ext-browser.js:96
(Diff revision 1)
> let viewId = `addons://detail/${encodeURIComponent(extension.id)}/preferences`;
>
> return window.BrowserOpenAddonsMgr(viewId);
> };
> +
> +global.makeWidgetId = id => {
this looks like a straightforward copy, I didn't examine this too closely.
Attachment #8894370 -
Flags: review?(mixedpuppy) → review+
Comment 4•8 years ago
|
||
mozreview-review |
Comment on attachment 8894369 [details]
Bug 1387907: Store computed module data in the startup cache.
https://reviewboard.mozilla.org/r/165542/#review170878
::: toolkit/components/extensions/ExtensionParent.jsm:1382
(Diff revision 1)
> };
>
> -let StartupCache = {
> +StartupCache = {
> DB_NAME: "ExtensionStartupCache",
>
> - STORE_NAMES: Object.freeze(["general", "locales", "manifests", "permissions", "schemas"]),
> + STORE_NAMES: Object.freeze(["general", "locales", "manifests", "other", "permissions", "schemas"]),
IMO "modules" would be better than "other"
Attachment #8894369 -
Flags: review?(mixedpuppy) → review+
Assignee | ||
Comment 5•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8894369 [details]
Bug 1387907: Store computed module data in the startup cache.
https://reviewboard.mozilla.org/r/165542/#review170878
> IMO "modules" would be better than "other"
I don't want to keep creating new top-level stores every time we have something new to store. At this point, we should really probably have two stores, one for extension-specific data (locales, manifests... permissions are probably a special case), and one for global data (schemas, modules, ...), so I'm trying to move in that direction.
The current setup made more sense when it was backed by IndexedDB, but there's not much benefit to it now.
Assignee | ||
Comment 6•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b97c5b419c9b35cadf7bbde154d1334a196a8061
Bug 1387907: Part 1 - Parse JSON files for file references. r=Mossop
https://hg.mozilla.org/integration/mozilla-inbound/rev/45657e17c932ccd7614d70faeb45dad531ee1e5b
Bug 1387907: Part 2 - Store computed module data in the startup cache. r=mixedpuppy
https://hg.mozilla.org/integration/mozilla-inbound/rev/6b6422c36cdbb9ca4c3a07903fe5fe55a3d07715
Bug 1387907: Part 3 - Merge ext-browser.js and ext-utils.js. r=mixedpuppy
Comment 7•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b97c5b419c9b
https://hg.mozilla.org/mozilla-central/rev/45657e17c932
https://hg.mozilla.org/mozilla-central/rev/6b6422c36cdb
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Assignee | ||
Comment 8•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/85af5aa841d16d58ae42d6f2e349e690f4a825e6
Bug 1387907: Follow-up: Move identity module init data to ext-browser.json.
Comment 9•8 years ago
|
||
bugherder |
Updated•7 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•