----- Original Message -----
> From: "Lawrence Mandel" <
lma...@mozilla.com>
> To: "Bill McCloskey" <
wmccl...@mozilla.com>
> Cc:
firef...@mozilla.org
> Sent: Tuesday, December 10, 2013 5:13:43 PM
> Subject: Re: Making new code be electrolysis-compatible
>
> Is it much more difficult to write e10s compliant code? (Sounds like the
> answer is no.) How much extra work (if any) do you expect this to be for the
> average front-end engineer?
I would be surprised if writing a completely new feature took much more work when done in an e10s-compatible way than in an e10s-incompatible way. In my admittedly limited experience, most frontend code doesn't touch content at all. For those features that do touch content, they don't do it too much, and the extra work when they do is pretty minimal. When we've rewritten code to be e10s-compatible, I don't think the result has been much longer (in lines of code) or harder to debug than the original. That suggests it wouldn't have been harder to write it the e10s way than the original, although it's hard to quantify any of this.
There are exceptions, of course. Occasionally we end up ping-ponging back and forth between chrome and content a few times in order to get work done, and it can be a little ugly. However, I've only seen this a few times, and I don't think it's any different than some of the callback-heavy code we have when going to disk.
Despite all this, I think there's little doubt that it's more work to write code in an e10s-incompatible way and then have to fix it later to be compatible. That's why I think it makes sense to try to do things right from the start. If there are concerns about a particular feature being too hard to write in e10s, then we should of course talk about the trade-offs. But I think the most sensible *default* policy is to write code that's electrolysis-compatible.
-Bill