Re: The CSS Problem

On Tue, Nov 13, 2012 at 12:20 PM, Kang-Hao (Kenny) Lu
<kanghaol@oupeng.com> wrote:
> (12/11/14 3:39), Tab Atkins Jr. wrote:
>> (12/11/14 0:40), Sylvain Galineau wrote:
>>> Actual adoption by implementors and usage by authors are the metrics
>>> I believe to matter most. (And I'd love to hear from others about
>>> the acquisition and sharing such data)
>>
>> Now that I only work on personal sites and can freely rely on Flexbox,
>> though, I've forgotten almost everything I knew beyond the bare
>> outlines, but the work I do is faster and more feature-ful.
>
> Jens didn't provide concrete reasons why "growing too fast" might not be
> a good things, but speaking of Flex, here are some of the possible concerns:
>
> 1. I saw a comment on Weibo saying that "yeah, Flex is nice, but it is
> not performant". I have no idea how reliable that statement is, but
> assuming it's true, meaning that the same layout would be more
> performant if achieved with 'float' and 'clear', and assuming he was
> playing with Webkit's implementation, it would be nice if Webkit
> implementers can focus on optimizing Flex instead of moving on to, say,
> Grid, given that Flex seems to be the one that all browser vendors are
> on board already. This would might or might not impact the "usage by
> authors" metric as mentioned by Sylvain.

I suspect that person was talking out of their ass, but...

In WebKit, new flexbox is much more performant than our old Flexbox
impl, and more performant than tables.  I don't know about
float/clear, but those hacks can only do a subset of what flexbox can,
and they're crappy and fragile anyway.

Flexbox is definitely more than performant enough to use on pages.
Layout is very, very rarely the limiting factor in page speed.  We'll
continue to get faster, but WebKit's current speed is more than enough
for now.  I suspect that other browsers will be similar, because our
better relative performance is a direct result of the better
algorithm.

> 2. I was told that IE 10 only implements those that are listed on [1].
> That is, it doesn't support 'flex-flow' (but there's 'flex-wrap') and
> 'align-content'. Could it be that IE 10 people spend too much time on
> other features such as Grid and Region? (Though I think the sensible
> guess is that the good implemention is not released yet)

No, it has nothing to do with that.  IE10 entered code freeze a little
before the CSSWG made its final changes to the spec and froze it for
CR.  It was just a bad timing mismatch, nothing more.

Note that the justify-*/align-* properties *are* supported in IE10,
just under their earlier names (flex-pack, flex-align, etc.).


You shouldn't try and guess at why impls do things unless you have
data, and you shouldn't trust performance assertions from random
people without good data.  ^_^

~TJ

Received on Tuesday, 13 November 2012 21:48:09 UTC