Is Google (or is Ian) soliciting feedback? Would be good to give 'em
what you wrote, if so.
/be
Patrick Walton <mailto:pwal...@mozilla.com>
October 13, 2013 1:03 PM
Some random thoughts:
* I guess the obvious cross-thread GC problem is remedied by making
animation proxies weak, so they decay to no-ops when their DOM objects
die.
* I foresee tricky synchronization problems to keep the DOM objects
that proxied objects in workers refer to in sync with what's happening
on the main thread. In Gecko (and Servo) layers can appear or vanish
in response to various events that are main-thread-specific.
* This is very short-term thinking, in that it handles only one case
(animations), and lacks the capability to respond to events. For
example, for touch-sensitive scrolling you want the ability to stop
the scrolling immediately when a touch-up event comes in. But events
are sent to the main thread, not the worker thread. So in the case of
main thread contention there will be lag as the event gets routed to
the worker thread and then the animation proxy stops. This could be
fixed by making an "event proxy" or something, but this is a slippery
slope toward an unmaintainable, unwieldy API.
* For the reason above and similar reasons, hacks like this are not
the way native apps achieve their responsiveness. Native apps are fast
because they have every native event handler execute very quickly (in
under 16ms for 60 FPS), despite the fact that they execute on the main
thread. Current browser engines are not suited to this because they
run lots of things on the main thread that don't have to be there (for
example, layout). I would rather fix *that* issue and allow Web apps
to be architected like native apps, instead of piling hacks upon hacks
to allow the Web to approximate native apps. Chromium seems
uninterested in some aspects of this, like allowing layout to run on a
separate thread, however...
For these reasons I'm lukewarm--I'm OK with this as a temporary hack,
but ultimately we need to accept that getting rid of the contention on
the script task by multithreading our browser engines is the only way
we're going to achieve the performance we need.
Patrick
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo
Dave Herman <mailto:dher...@mozilla.com>
October 13, 2013 10:57 AM
Interesting proposal from Google:
https://github.com/ianvollick/animation-proxy/blob/master/Explainer.md
Dave
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo