4 ms·
Or you can do what google sheets does: only draw N cells at any time, and just change their contents depending on where you are scrolled to.
by toomim 10y ago
Or you can do what google sheets does: only draw N cells at any time, and just change their contents depending on where you are scrolled to.
- cloverich 10y agoThis is "virtualized" views; other comments in this thread link to some relevant projects!
- georgewfraser 10y agoGoogle sheets uses canvas. The strategy you describe is orthoganal to canvas versus DOM.
- ic4l 10y agoI had to verify this... I cant believe it, they doing all the rendering logic for all the cells in canvas. They are not rendering simple cells either, sheets has may features :O. Testing would be the easy part, in some cases it would be easier than DOM because you can do image diffs... The harder part is BUILDING IT.
- chrishere 10y agoThey applied some kind of mixed model in which the entire effort connected with rendering the body of the grid (cells) is being drawn in canvas and the rest of it, including headers, selection and editors, are rendered in a regular way. There is no doubt that Google Sheets keeps almost all of its logic on the back-end side.