On Thu, Mar 08, 2018 at 02:40:52PM -0800, Bobby Holley wrote:
> 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.
> 
> 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.
> 
> 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.

Last time I looked at bindings, I was horrified to see all the various
strings that all look the same except between bindings for field and
class names. I wonder how much of the bindings cost in terms of binary
size is due to that, or other similar inefficiencies. At least there
seems to be a low hanging fruit there. (IIRC, the same was true of ipdl
bindings)

Mike
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to