Re:Help us invent CSS Grid Level 3, a.k.a. "Masonry" layout
by fantasai on Tuesday April 23, 2024 @03:48PM
(#40136409)
Quadratic performance is a bit of an exaggeration. It's not O(N_items^2). It's N_tracks x N_items, and basically nobody has N_tracks ≈ N_items. Practically speaking, the upper limit is closer to (N_items^1.5) because N_tracks is unlikely to go over sqrt(N_items) in cases where N is large. And almost all of those layouts will have repetitive track sizing patterns, so they can be optimized to a much smaller N_tracks that approaches O(N_items).
[ Parent
| on HN ]
There are no comments on this comment yet.