[meta] Don't spin the event loop

RESOLVED DUPLICATE of bug 1007448

Status

Cloud Services
Firefox Sync: Backend
RESOLVED DUPLICATE of bug 1007448
8 years ago
7 months ago

People

(Reporter: mconnor, Unassigned)

Tracking

(Depends on: 1 bug, {meta})

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [sync:scale])

(Reporter)

Description

8 years ago
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.
Depends on: 603301
No longer depends on: 581560
(Reporter)

Updated

7 years ago
Duplicate of this bug: 529380
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
Depends on: 652221
(Reporter)

Updated

7 years ago
Priority: -- → P3
Summary: kill Sync.js dependency → [meta] Don't spin the event loop
Keywords: meta
Whiteboard: [sync:scale]
Blocks: 809457
Duplicate of this bug: 774779
Depends on: 731524
Depends on: 823198
Blocks: 731524, 710080
No longer depends on: 731524
Priority: P3 → --
Blocks: 702180
Blocks: 697649

Updated

6 years ago
Depends on: 829770

Updated

6 years ago
No longer depends on: 829770
Status: ASSIGNED → NEW
No longer blocks: 697649

Updated

5 years ago
Blocks: 697649
Assignee: rnewman → nobody

Updated

3 years ago
Depends on: 1186348

Updated

7 months ago
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.