You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What you were expecting: SimpleFormIterator should be able to handle reasonable sized tables without performance issues.
What happened instead:
We are using SimpleFormIterator to edit 7x TextInput and 1x SelectInput. Unfortunately, even for a single entry in the ArrayInput-Field, we are seeing warnings like this in the console when editing:
[Violation] 'message' handler took <N>ms
[Violation] 'input' handler took 347ms
chunk-276SZO74.js?v=198b0983:18625 [Violation] 'mousedown' handler took 346ms
chunk-276SZO74.js?v=198b0983:18625 [Violation] 'click' handler took 356ms
5[Violation] 'focusout' handler took <N>ms
chunk-276SZO74.js?v=198b0983:18625 [Violation] 'click' handler took 361ms
chunk-276SZO74.js?v=198b0983:18625 [Violation] 'click' handler took 420ms
[Violation] 'input' handler took 365ms
[Violation] 'input' handler took 360ms
chunk-276SZO74.js?v=198b0983:18625 [Violation] 'setTimeout' handler took 380ms
The slowness is more or less linearly increasing with every form-component, in other words, it looks like react-admin doesn't really work well / scale with larger data-sets / forms. We really hope that's not the case, as this for us is a show-stopper.
Thanks for the report and the sandbox.
A sandbox forked from the simple demo would have been easier to work on, since we wouldn't have to rule out all the custom code you have in your project first.
But in any case, I tried to look a bit deeper in it, and indeed it seems there are a lot of unnecessary rerenders of the ArrayInput children.
These rerenders seem to be due to updates in the formState, e.g. when inputs get dirty. And also some components seem to render because React thinks their children have changed, which may indicate a non-stable reference to children function.
In any case, this deserves more investigation, but I'm convinced there are things to optimize there, so I'm labeling as bug.
What you were expecting:
SimpleFormIterator
should be able to handle reasonable sized tables without performance issues.What happened instead:
We are using SimpleFormIterator to edit 7x TextInput and 1x SelectInput. Unfortunately, even for a single entry in the ArrayInput-Field, we are seeing warnings like this in the console when editing:
The slowness is more or less linearly increasing with every form-component, in other words, it looks like react-admin doesn't really work well / scale with larger data-sets / forms. We really hope that's not the case, as this for us is a show-stopper.
Here is a demo: https://stackblitz.com/~/github.com/HansKre/ra-demo
Steps to reproduce:
Go to the demo-link and try using the form. Ideally, open dev-tools to see the warnings.
Related code:
https://stackblitz.com/~/github.com/HansKre/ra-demo
Environment
The text was updated successfully, but these errors were encountered: