it's ugly, and we need to just write proper async code and not kill babies. That's XBL's job, after all.
I've started https://wiki.mozilla.org/Services/Sync/WEP/116 as a place for collecting thoughts on the design of the async APIs and the migration path.
Relevant thread on dev-platform: https://groups.google.com/group/mozilla.dev.platform/browse_thread/thread/cae2206562025b3c. Looks like using generators isn't a viable option to make async code look pretty.
Let the record show that there was misinformation in the thread and generators are fine to use from a safety perspective (they do not secretly spin a nested event loop). They do, however, have some optimization impact at this time since I do not believe a generator function can be method JITted directly (though the things it calls should be fine); I am unclear if it likewise precludes the tracing JIT for that frame between yields or not. Until ECMAScript adopts generators, we probably won't see a lot of optimization of them...
(In reply to comment #4) > ... Until ECMAScript adopts generators, we probably won't see a > lot of optimization of them... It's good to hear that they're not totally unsuitable, but given Sync's unusual performance requirements, anything which is a little prettier but a lot slower or more consy isn't really in the running. More's the pity…
Assignee: nobody → rnewman
Status: NEW → ASSIGNED
OS: Mac OS X → All
Hardware: x86 → All
Summary: kill Sync.js dependency → [meta] Don't spin the event loop
Status: NEW → RESOLVED
Last Resolved: 7 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1007448
You need to log in before you can comment on or make changes to this bug.