Comment

Comment by deepsun

Just wrap it in a container with fixed height and "overflow: hidden".

Now the layout engine knows that it doesn't need to recalculate positions of elements outside that wrapper, and it's much faster.

By the way, the same trick was speeding up large <table> rendering back in the day. As long as you know the size of your rows or columns ahead of time, which kinda defeats the purpose of <table>.

parent deepsun 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton