Hi all,
I just wanted to give you heads up that we recently found a performance
regression in mozilla-central (1.3) that was traced back to for-of loop
syntax being updated to the new es6 protocol. See bug 927079:
https://bugzilla.mozilla.org/show_bug.cgi?id=927079
The current issue is that the new protocol now requires returning an
object from an iterator on every turn of the loop. This creates a large
number of additional allocations which have a noticeable impact on b2g
devices.
Long term, it sounds like the js vm will be optimized to avoid these
kinds of allocations, but currently its an issue.
In this particular case we chose to change the code to avoid for-of syntax.
I just wanted to send out an FYI so that people could weigh the cost of
for-of in other b2g code. See here for a (probably partial) list of
places where this code is used in mozilla-central:
https://gist.github.com/wanderview/7046437
In particular, these seem relevent to b2g:
./b2g/chrome/content/shell.js
./b2g/chrome/content/dbg-browser-actors.js
./dom/system/gonk/ril_worker.js
./dom/system/gonk/RILContentHelper.js
./dom/system/gonk/RadioInterfaceLayer.js
./dom/system/gonk/NetworkManager.js
./dom/telephony/gonk/TelephonyProvider.js
./dom/mobilemessage/src/gonk/MobileMessageDatabaseService.js
Thanks!
ben
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g