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.
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).
(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
You need to log in before you can comment on or make changes to this bug.