Hacker News new | ask | show | jobs
by hanniabu 2543 days ago
Fixed dimensions is also good for UX, it would suck trying to read a table changing 10x a second and seeing the columns shifting back and forth.
1 comments

It doesn’t even have to be a problem like that to be a performance problem. For example, imagine a five row table where the last column always has 1 digit in the first row, 2 in the second, 3 in the third etc. When rendering (without table-layout:fixed) the browser will check the last cell, see one digit, and size that column appropriately. It’ll then carry on rendering the second row, see two digits, then work out the new size for the column and rerender the entire table. Repeat for rows three, four and five.

Not a problem for a single layout pass, but a performance problem if the data changes every frame.