- From: Ben Kelly <notifications@github.com>
- Date: Fri, 10 Apr 2015 14:16:59 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Message-ID: <whatwg/streams/issues/320/91693875@github.com>
> Maybe a good way to cut out the noise here is to actually test callbacks + a loop (i.e., manually emulate the microtask queue) and compare that to sync read. Then we can see if an ideal fast microtask queue/promise implementation still introduces 7 ms of latency, or if it's just a Firefox-on-mobile optimization issue. As far as I know, a callback async loop cannot be implemented without hitting timer 4ms clamping. This is why developers want something like nextTick or setImmediate. It seems the promise microtask is the solution. Also, I believe Firefox has a reasonably fast microtask queue implementation. Its almost certainly faster than something that puts the next event in the main event queue like setTimeout. Finally, if you think this is a firefox issue, please help me fix the benchmark to run in chrome. :-) Sorry I didn't have time to do this myself, but my time is shorter than usual this week due to travel. > Angular has one, where once control returns to Angular code they run a while() loop of framework-specific tasks. We could do something similar. I would be interested to see how we could construct this with the non-promise async primitives without triggering timer clamping in a an async loop. --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/streams/issues/320#issuecomment-91693875
Received on Friday, 10 April 2015 21:17:26 UTC