-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delay rendering large data sets while using Cell #22
Comments
Yes, it is known limitation and i don't have idea how to avoid it. Now Cell should be used only for small datasets. Check built-in ListView component, it have almost the same issues (big delay for rendering)! |
I think what you said should be rephrased as:
Large data sets should be supported with |
Yes, it is quite tricky to solve as you mentioned, but you are welcome to do PR for this! I thought to create some kind of factory of Cells and re-use cells like UITableView does - but i don't see way how to pass view factory from JS to native code (because of async nature). Another way is to 'clone' Cell view when necessary, but it is not clear how to nicely clone UIView and how to set new values there. The point of having this component now is to use built-in cells types for some simple scenarios, like menus or list of countries/states. Maybe solving of #21 will add possibility to use it for simple 'settings' forms. |
Good points. I will try something out this weekend, once I have some free time. Great job on the lib btw. Excited to finally get some view recycling with react-native ♻️ |
I recommend making this an enhancement label maybe? |
Making cells reusable might help with this. Check out "LargeTableExample" in TableViewDemo for a large data set, and "FirebaseExample" for an example of loading dynamic data (the reusable cell feature is currently on https://github.com/nyura123/react-native-tableview) |
While using the
Cell
component of the library I noticed that there is large delay if I initialize it with a large amount of data. It takes about 3-5 seconds to render.I am doing something like this in my component with 1000 dummy elements initialized:
This issue is not reproducible if I change my implementation to be
Item
, rather thanCell
, for large data sets. Before I start digging into the source I wanted to know if this is a known limitation with Cell (slowness with initializing large data sets).The text was updated successfully, but these errors were encountered: