Re: [css-houdini-drafts] Gather and publish CSS Typed OM performance data in an explainer?

> I've done some initial benchmarking. tl;dr Allocating Typed OM objects is slow, so you have to reuse objects for performance gains.

This is expected, yeah.  The fast case is indeed something like "build a CSSTransformValue, use it in multiple `.set()` calls across `rAF()` callbacks".

This is why I *really really really* want ECMAScript to give us Value Objects, or Typed Objects as the proposal seems to have evolved into, where they're just wrappers around a chunk of TypedArray data.  These should be much faster because they're immutable and we can reuse them more widely.

(This is also why TypedOM was originally as strongly immutable as we could make it with normal JS objects, so we could replace it with Typed Objects later with minimal breakage. We gave up on this when JS appeared to not be willing to give us the thing in a reasonable timescale; we might have to re-evaluate that.)

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/634#issuecomment-363934938 using your GitHub account

Received on Wednesday, 7 February 2018 22:36:49 UTC