royale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harbs <>
Subject Re: Layout optimizations
Date Mon, 26 Mar 2018 20:28:27 GMT

> On Mar 26, 2018, at 8:18 PM, Alex Harui <> wrote:
> So given all that, I think the independent issues are:
> 1) can we optimize our layouts to use browser layouts more?

Possibly, and we should when we can.
> 2) can we optimize our layouts to avoid direct interactions with the dom?

Possibly to a certain extent. I do think that we want to offer the best possible performance
if users can set hard values for x, y, width and height. With hard-coded values DOM interaction
could be kept to a minimum. It would be an interesting experiment to see what would happen
if we *don’t* rely on browser layout and hard code everything.

> 3) is there any advantage to deferring layout via requestanimationframe?

Definitely — at least if there’s a need to read measurements. Many layouts do need that
info at some point. If measuring is standard, it’s also a good way to make sure all the
children are measured for calculating that before layout. There needs to be a way of separating
reads from writes. Although I now believe that requestAnimationFrame is not the best way to
delay execution. There are higher resolution ways of running async code.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message