<div dir="ltr"><div>I've seen a lot of momentum around migrating chrome-only XPIDL interfaces to WebIDL. I'm concerned that insufficient attention is being paid to the impact on our binary size.</div><div><br></div><div>Fundamentally, the WebIDL bindings improve performance and spec correctness at the expense of code size (and build times). This makes sense for things that are web-exposed or performance-sensitive. But since the webidl bindings are also more modern and easier to use, I'm concerned that people will use them indiscriminately for all sorts of internal APIs, and our binary will bloat by a thousand paper cuts.</div><div><br></div><div>A WebIDL method binding can easily cost a kilobyte or more, depending on the number and types of the arguments. If we were to convert all of our existing xpidl methods, we could approach 10MB in added code size.</div><div><br></div><div>Gating on DOM peer review gave us some degree of oversight to prevent overuse. What should replace it?<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 8, 2018 at 2:01 PM, Kris Maglione <span dir="ltr"><<a href="mailto:kmaglione@mozilla.com" target="_blank">kmaglione@mozilla.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It is now possible[1] to create chrome-only WebIDL interfaces in the dom/chrome-webidl/ directory that do not require review by DOM peers after every change. If you maintain an internal performance-sensitive XPIDL interface, or are considering creating one, I'd encourage you to consider migrating it to WebIDL.<br>
<br>
Some caveats to keep in mind:<br>
<br>
- Interfaces in this directory must be annotated with [ChromeOnly]. Dictionaries, however, can be included without any special annotations.<br>
<br>
- If you are new to writing WebIDL files, I'd still encourage you to ask a DOM peer to review at least your initial check-in.<br>
<br>
- Please make sure that you do not attempt to expose any of the interface or dictionary types defined in these WebIDL files to web contexts, through interfaces defined in dom/webidl/. Doing so would require (and fail) DOM peer review, in any case, but please think ahead.<br>
<br>
Thanks.<br>
<br>
- Kris<br>
<br>
[1]: As of bugs 1443317 and 1442931<br>
______________________________<wbr>_________________<br>
dev-platform mailing list<br>
<a href="mailto:dev-platform@lists.mozilla.org" target="_blank">dev-platform@lists.mozilla.org</a><br>
<a href="https://lists.mozilla.org/listinfo/dev-platform" rel="noreferrer" target="_blank">https://lists.mozilla.org/list<wbr>info/dev-platform</a><br>
</blockquote></div><br></div>