Skip to content

Support for massive datasets in CellSizeAndPositionManager - #840

Closed
ghost wants to merge 2 commits into
masterfrom
unknown repository
Closed

ghost wants to merge 2 commits into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Oct 10, 2017 •

Copy link
Copy Markdown

We have a (somewhat ridiculous) use case for Grid. I'm finding that chrome runs out of memory when scrolling through sets with around 1 billion rows.
It fails in getSizeAndPositionOfCell on the loop that caches the size of every row up to the new position, this behavior seems unnecessary when the height of rows is consistently known or fixed.

Passing a callback through to CellSizeAndPositionManager that will provide "range" sizes is one solution I've found that seems to be working.
A cleaner solution might be to have CellSizeAndPositionManager toggle it's logic based on knowing that cell sizes are fixed (return the fixed size * number of rows). I played with the callback solution first just because it's a simpler implementation for grids with fixed heights on everything but the header.

Open to suggestions!

@ghost

ghost commented Oct 15, 2017 •

Copy link
Copy Markdown
Author

Saw your tweets, figure I'd provide some more insight into the use case.
Anything over 10k rows doesn't provide a whole lot of utility, totally agree. "Displaying" all 1B+ rows is purely a way of showing the user that all of the data is there and they can filter on it to get whatever they need.
The client never holds onto more than it needs for the current display window.

(also edited the title, didn't mean this to come across as a bug accusation, it's definitely a feature request)

@ghost ghost changed the title CellSizeAndPositionManager runs out of memory on 1B+ rows Support for massive datasets in CellSizeAndPositionManager Oct 15, 2017
@bvaughn

bvaughn commented Oct 15, 2017 •

Copy link
Copy Markdown
Owner

Saw your tweets, figure I'd provide some more insight into the use case.

Oh, whoops! Sorry if my tweet seemed like I was poking fun at this issue. I didn't mean to!

I was just really amused that someone was pushing RV that hard. I don't think that even I have tried to do that 😁

(also edited the title, didn't mean this to come across as a bug accusation, it's definitely a feature request)

No worries. I didn't read it as an accusation, just an extreme edge-case.

By the way, I changed some Prettier config this morning. You'll want to merge in and run yarn prettier at some point to resolve the conflicts.

@ghost ghost closed this Nov 28, 2017
@bvaughn

bvaughn commented Oct 18, 2026

Copy link
Copy Markdown
Owner

Sorry for the very long delay in getting back to you about this!

I've just finished a large update for version 10 of react-virtualized (#1900): the library has been rewritten in TypeScript, every component is now a function component (React 18+ is required), and the source moved from source/ to lib/. Because of that, this PR can't be merged as-is. Version 10 still computes and caches the size and position of every row up to the one being rendered, even when the size is a fixed number.

If you're still interested in this change, I'd welcome a new PR with it rebased onto the version-10 branch (or onto master once version 10 has been merged).

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant