I’m 99.9% sure that browsers mark the structure as dirty when something is 
written, but none of the actual calculations and rendering happen until 
something is read or the next rendering cycle in the browser happens.

I’m not sure if we’re disagreeing here.

One question I have is what the performance implications are of using CSS vs. 
locally specified element styles (where the CSS does not need to be calculated 
from CSS declarations). Logically, local styling of elements should be more 
performant. I’m not sure what kinds of optimizations browsers have in terms of 
CSS lookups (and whether this is something even worth considering).

> On Nov 22, 2017, at 12:22 PM, Erik de Bruin <e...@ixsoftware.nl> wrote:
> 
>>> I would say that the addition of each element triggers the browser to do
>> a
>>> full DOM parse and reflow of the CSS.
>> 
>> I don’t think this is true. Reflow only happens when attributes of the DOM
>> is *read*. Writing to the DOM does not trigger a reflow.
>> 
> 
> I'm not sure I agree. An addition to the DOM means that the structure
> changed and that it needs to be re-rendered. This means that in addition to
> other things, at least the 'cascading' bit of CSS needs to be re-evaluated
> before the browser can render the new state.
> 
> Again, I'm certainly not arguing against the RoyaleJS architecture! I was
> there when it was created and stand by many of the decisions we made. I am
> in this thread because Olaf's question chimed with my thinking on possible
> alternative framework architectures.
> 
> Thanks,
> 
> EdB
> 
> 
> 
> -- 
> Ix Multimedia Software
> 
> Jan Luykenstraat 27
> 3521 VB Utrecht
> 
> T. 06-51952295
> I. www.ixsoftware.nl

Reply via email to