mozilla :: #activity-stream

7 Aug 2017
16:25Mardakdmose: for raf+raf alternatives, do we just want the time just after the first raf returns (which should allow any changes during the raf to reflow)?
16:26Mardaki found that Promise.resolve().then(callback_on_next_tick) seems to be the fastest way to delay from the current execution
16:26Mardakso maybe we want raf+promise
16:28Mardaksee example timings from
17:02dmosei'll jhave a look]
18:02dmoseMardak: interesting. i'd be interested in a vidyo to walk through that, as i'm having a hard time convincing myself that those things say what they seem to be saying
18:04dmoseMardak: your room?
18:40dmoseMardak: of course, we currently believe that the reflow will have completed by the time setTimeout returns
18:40dmoseMardak: i wonder if that's also true of the Promise resolution
18:41Mardakas in does reflow happen synchronously with the completion of raf?
18:41dmoseas in, what exactly triggers the reflow and subsequent paint?
18:41dmoseand why is it that we think it's done when setTimeout completes?
18:42dmoseand, in fact, why aren't two requestAnimationFrames actually required, given that we think we're waiting on two paints?
18:43Mardakthe reason for the second raf was that setTimeout was considered inconsistent for timing
18:43Mardakso it's not that we actually need a second paint
18:43dmoseMardak: how could we not? if a reflow happens, it has to be painted to the screen
18:44Mardak"how could we not" what?
18:44dmoseneed a second paint
18:44dmoseif we're doing a reflow after the first rAF, how does that reflow get onscreen, if not via another paint?
18:45Mardakwhat reflow are we doing after the first raf?
18:45dmoseoh, i see
18:45dmosethe reflow is happening before the rAF
18:45dmosebut doesn't get painted until after the rAF, because rAF executes before the paint
18:46Mardakthe reflow is happening as part of finishing rAF
18:46dmoseok, i'll buy the promise thing then
18:47dmoseat laest, assuming that promise can't resolve between the time rfa has returned and before the paint happens
22:08Mardakdmose: oh i was mostly just estimating 5034.7 raf->raf assuming it started at 5000. 34ms for 2 rAFs -> ~17ms for each
22:08dmoseah gotcha
22:18streaminatorMardak: Hey! Someone requested a review:
22:23Mardakdmose: is PR still WIP? also are you manually wrapping comment lines?
8 Aug 2017
No messages
Last message: 13 days and 21 hours ago