Live data from Hacker News

How I made Google’s data grid scroll faster with a line of CSS

medium.com

211–220 of 223 posts

Re: How I made Google’s data grid scroll faster with a line of CSS

#211
post #3

I've been doing web development for 20 years now. I don't know if it's strictly endemic to web or frontend, but I feel like we're solving the same problems over and over again, using the same low levels of abstraction. There's no reason for lists to scroll slowly after so many years of scrolling lists. There should just be one way to do a scrolling list, implemented natively and left alone. Yet, in web development, t…

I work in UX, I am constantly being given designs that don't work well with native/semantic elements- a great example is tables. As soon as the table needs some kind of animation, drag-drop behavior, anything like that, I can't use a anymore; or it becomes some frankenstein kafkaesque amalgamation that is impossible to maintain. Does the table really need an animation? (probably not) drag and drop? (probably not) But…

> But management and the people in charge of OK'ing these designs have a 'make-it-happen' attitude and nobody really cares about semantic, native feel

I think this is generally a symptom of current leadership practices, where the people making decisions about technical direction are not people who understand how their product functions. This generally isn't top leadership, but the upper and mid level management, who feel they need to "make their mark" on the product to get promoted.

Re: How I made Google’s data grid scroll faster with a line of CSS

#212

Opinions are my own. I don't think this is recommended to use internally at Google because it's not supported on Safari.

That seems like a bizarre reason not to use it, given that it's strictly a performance optimisation, and browsers will simply ignore CSS rules they don't understand.

It causes a new stacking context which has significant impact on how everything is rendered and things like Z-index behave. This can cause head-scratching issues and differences which aren't obvious at first sight.

Re: How I made Google’s data grid scroll faster with a line of CSS

#213
post #11

Earlier quoted context omitted.

Unfortunately, as is often the case when one learns of a new CSS property or a Web API, the browser support is just not there yet. Safari, for example, doesn't support this at all: https://caniuse.com/mdn-css_properties_contain

I don't think this matter much? It's just a performance optimization, Safari can remain slow while all modern browsers benefit. Unknown CSS values should be ignored so there should be no impact on actual usability. Seems to me like it's excellent for daily use despite the lack of compatibility of outdated browsers.

It matters because it causes a new stacking context. Z-index only affects elements within the same stacking context, so you then can get weird behaviour that one floating tooltip overlaps something in Firefox/Chrome but doesn't in Safari because Safari doesn't create the stacking context.

Re: How I made Google’s data grid scroll faster with a line of CSS

#214
post #15

Earlier quoted context omitted.

You should see what you can do with and these days, no more do your native browser elements have to look like complete dog to receive free native device controls

I can't believe these elements slipped under my radar for so long - I have a site with no Javascript (outside of Google Analytics anyway) and and have helped me keep it that way.

You avoid JavaScript, except the worst usage of it? Very bizarre choice...

Re: How I made Google’s data grid scroll faster with a line of CSS

#215
post #162

Earlier quoted context omitted.

>table with 40k rows Oh I have one with 6K rows, 300ms to insert into a page if I try to measure, but in reality browser freezes for 3 seconds (1.8s style, 900ms layout, 300ms update tree). Freezing goes away with position: absolute, but it still takes 3 seconds to show up after .appendChild. I tried replacing Table with Flex divs, even worse speed.

If your table is simple (values, no markup), try DataGridXL: here's a One Million Cells Demo that loads in an eyeblink: https://www.datagridxl.com/demos/one-million-cells . (Disclaimer: I am the maker)

Its not real. What good is virtual table if I cant search for contents of last row, "2000;1", after loading the page :( Still, this gives me an idea. Dump contents of my table as text under virtual one so search will at least scroll down to appropriate offsets.

Re: How I made Google’s data grid scroll faster with a line of CSS

#217
post #108

Earlier quoted context omitted.

What you need is Open UI. The browser vendors are working on it. https://open-ui.org/ > The purpose of Open UI to the web platform is to allow web developers to style and extend built-in web UI controls, such as dropdowns, checkboxes, radio buttons, and date/color pickers. > To do that, we'll need to fully specify the component parts, states, and behaviors of the built-in controls, as well as necessary accessibility…

https://open-ui.org/charter > Most recent revision: April 1, 2020 That doesn't inspire confidence...

https://github.com/openui/open-ui last commit 10 hours ago

Re: How I made Google’s data grid scroll faster with a line of CSS

#218
Svelte has solved performance, and made writing butter smooth, lightning fast web apps 10x easier with 10x less code. Blows my mind that more companies haven’t adopted it considering devs fall in love with the unmatched DX, and users get highly optimized apps shipped to them at a faster rate thanks to the boost in dev speed.

Re: How I made Google’s data grid scroll faster with a line of CSS

#219
post #215

Earlier quoted context omitted.

If your table is simple (values, no markup), try DataGridXL: here's a One Million Cells Demo that loads in an eyeblink: https://www.datagridxl.com/demos/one-million-cells . (Disclaimer: I am the maker)

Its not real. What good is virtual table if I cant search for contents of last row, "2000;1", after loading the page :( Still, this gives me an idea. Dump contents of my table as text under virtual one so search will at least scroll down to appropriate offsets.

Version 2 (december) will have a very fast search feature. But you're right: CTRL+F does not work, as it is virtual. I don't really understand your idea, can you elaborate?

Re: How I made Google’s data grid scroll faster with a line of CSS

#220

If anyone is looking for the FASTEST data grid in the world, here is a One Million Cells demo: https://www.datagridxl.com/demos/one-million-cells . (Disclaimer: I am the maker of the product)

Congratulations on your cool project. You mentioned it 8 times in this thread alone. While I wouldn't call your comments spam (they do refer to their individual parents, though), stumbling over the same link so many times while reading one thread does leave a certain weird taste.

https://news.ycombinator.com/item?id=29024792

https://news.ycombinator.com/item?id=29024825

https://news.ycombinator.com/item?id=29024709

https://news.ycombinator.com/item?id=29024850

https://news.ycombinator.com/item?id=29024739

https://news.ycombinator.com/item?id=29024768

https://news.ycombinator.com/item?id=29024934

Post reply on HN