> I have concerns about implementing full CSS algorithms in JS. People seem
to think that makes it fast by default.

It's more that what people are currently doing is crazy slow. Namely, to
implement a custom layout today, you typically have to
a) identify some DOM elements to measure (typically the children of a
container with custom layout)
b) synchronously lay out the entire document
c) take some measurements
d) jiggle some CSS properties around those elements
e) lay out the entire document again for rendering
And that's the *best* case. When you have multiple independent custom
layouts in the same page, steps b)-d) will probably repeat multiple times.
For some layouts (e.g. if you need both minimum and preferred intrinsic
widths) you may need to repeat b)-d) multiple times just for a single
layout.

It's easy to imagine how a custom layout API can beat that.

Rob
-- 
oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo
owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo
osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo
owohooo
osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o o‘oRoaocoao,o’o
oioso
oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo
owohooo
osoaoyoso,o o‘oYooouo ofooooolo!o’o owoiololo oboeo oiono odoaonogoeoro
ooofo
otohoeo ofoioroeo ooofo ohoeololo.
_______________________________________________
dev-servo mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to