Switching to async/await from Task.jsm/yield

Ehsan Akhgari ehsan.akhgari at gmail.com
Mon Mar 27 03:16:27 UTC 2017


On 2017-03-17 7:41 PM, Kris Maglione wrote:
> On Fri, Mar 17, 2017 at 07:30:46PM -0400, Ehsan Akhgari wrote:
>> Have we measured the performance of our async/await implementation?  I
>> think we should definitely do some extensive testing of the performance
>> of any new ES primitives before deciding to switch to using them in the
>> front-end code en masse.  Of course, if the performance result aren't
>> good, that doesn't mean we shouldn't use them in the front-end code, it
>> means we need to make the performance better.  :-)  But we need to be
>> able to make the trade-off cautiously.
> 
> Yes. There was performance testing for the self-hosted version (which
> was basically the same as the Promise.jsm implementation) before it was
> converted to C++, and after:
> 
> https://bugzil.la/1314055
> 
> In short, it's better, but not hugely.

That's quite nice if you ask me.  :-)  I have see code surrounding this
stuff show up in profiles a lot, although I admit I haven't had a way to
measure the overhead of this part directly.  And often times the way
that this matters is in a "death by a thousand cuts" scenario, i.e.,
when in some edge case something is taking super long, this overhead
makes things much worse, so I'm really happy to see this happening!



More information about the firefox-dev mailing list