View selection depends on validating the type of the data coming in, which is currently tightly integrated with the view loader. This can cause (potentially quite expensive) validations on large data sets with every redraw.
We should do a couple things to memoize this and ensure better performance:
Memoize data validation so it isn't rerun with every interaction
Separate view selection from view component instantiation within the view loader (so that e.g. View.tsx has a separate step for picking the view--which doesn't depend on the window dimensions--and then actually instantiating that view component can come after). This will allow the view selection itself to also be memoized
Make sure these changes get pushed to the other libraries as well
Production deployments seem to have optimized this out for some reason, so it's not an urgent need (just something that makes development environments more representative), but probably a medium priority since the changes won't be super extensive and ought to be echoed to other projects in the ecosystem.
See e.g. PR #9 for the start of this problem.
View selection depends on validating the type of the data coming in, which is currently tightly integrated with the view loader. This can cause (potentially quite expensive) validations on large data sets with every redraw.
We should do a couple things to memoize this and ensure better performance:
View.tsx
has a separate step for picking the view--which doesn't depend on the window dimensions--and then actually instantiating that view component can come after). This will allow the view selection itself to also be memoizedProduction deployments seem to have optimized this out for some reason, so it's not an urgent need (just something that makes development environments more representative), but probably a medium priority since the changes won't be super extensive and ought to be echoed to other projects in the ecosystem.