Closed
Bug 1381711
Opened 7 years ago
Closed 4 years ago
Minimize the amount of schema JSON stored in memory
Categories
(WebExtensions :: General, enhancement, P2)
WebExtensions
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: kmag, Unassigned)
References
(Blocks 1 open bug)
Details
We currently keep all of our schema JSON data in memory, in its original form, in all processes, for the entire length of the session. Much of this data, such as description strings and unsupported properties, can be thrown away entirely. A lot of it is only needed in certain process types. When we load schema data, we should normalize it so that only the actually necessary data is used, and we should filter it so that only the schema data needed in a given process type is actually kept there.
Updated•7 years ago
|
Priority: -- → P2
Updated•6 years ago
|
Product: Toolkit → WebExtensions
Comment 1•6 years ago
|
||
Descriptions are already being stripped as of https://hg.mozilla.org/mozilla-central/rev/f39eaceb3ca0 The schemas also define the types for callback parameters, but these aren't used either. Is it feasible to add a pre-processing step to the compilation to strip all unnecessary data? Then we can remove all runtime sanitization logic (stripping license headers/comments, descriptions, and whatever patchwork we come up with to shrink the schema file size).
Comment 2•6 years ago
|
||
(In reply to Rob Wu [:robwu] from comment #1) > The schemas also define the types for callback parameters, but these aren't > used either. should have said "in release builds". Callback parameters are validated in debug builds since https://hg.mozilla.org/mozilla-central/rev/4ca0f86e67cb
Comment 3•4 years ago
|
||
"description" is already removed by part 3 of bug 1382645
Process-specific schemas was done in bug 1470783
Unsupported entries will be handled in bug 1601610 .
You need to log in
before you can comment on or make changes to this bug.
Description
•