W3C home > Mailing lists > Public > www-style@w3.org > May 2010

Re: Box Reordering

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 24 May 2010 20:21:59 -0700
Message-ID: <AANLkTimxgQlCE8Hbh7iab6mDUWA_l2jfCPue1g7GgBQZ@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: Alex Mogilevsky <alexmog@microsoft.com>, James Robinson <jamesr@chromium.org>, www-style list <www-style@w3.org>
On Mon, May 24, 2010 at 6:39 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 5/24/10 9:24 PM, Alex Mogilevsky wrote:
>>
>> I predict that somebody will fill a Flexbox with thousands of items and
>> then use box-ordinal-group for sorting, and expect reasonable
>> performance. Then Flexbox layout not only needs a secondary storage for
>> child order and quicksort. Neither is rocket science, but if it needs to
>> be there it really should have a strong reason.
>
> Fwiw.... the Gecko implementation is somewhat as you described, and it's not
> good enough for this use case if the DOM is being mutated and you have to
> resort.  Quicksort is typically O(N log N) or worse on nearlt-sorted data,
> so you get overall O(N^2 log N) behavior unless you add yet more complexity
> and sort lazily, etc.

Of course, there are relatively simple relatives to quicksort that
perform well on nearly-sorted data, which is what you'll see most of
the time here.


> The complexity is the real issue.  The non-flexbox box model is already
> complicated enough that defining how this new feature would interact with
> all the kitchen sinks already tossed in (and then implementing it) would be
> a major undertaking.  It doesn't obviously seem worth it.

That was my thought; I just wanted to run it by everyone else.
Someday, in the future, when we have stricter definitions of precisely
how everything works rather than the relatively ad hoc conglomeration
we have today (a long term goal!), we may want to do this.  But for
now, I'm happy enough limiting it to flexbox.  Flexbox is the
"application layout" spec anyway, and content reordering like this is
most useful in terms of applications, not documents.


Now, on to simpler bikeshedding matters, several people have expressed
dissatisfaction with the name 'flex-index'.  I came up with that name
by just taking the common flexbox prefix and appending -index, since
this property most closely matches the existing z-index property.  How
about 'box-index', or 'box-order'?  I'm partial to the last, even
though it loses the connection with z-index.

~TJ
Received on Tuesday, 25 May 2010 03:22:51 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:27 GMT