-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
SimpleFormIterator very slow #10419
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
Comments
Thanks for the report and the sandbox. In any case, this deserves more investigation, but I'm convinced there are things to optimize there, so I'm labeling as bug. |
@slax57 I know it's been quite a while since this bug was opened, but I'd like to verify one thing regarding react-admin in terms of the issue discussed (I'm writing, as I think there might be potential improvement in terms of react-admin, if you'll confirm what I suppose might be the case for improvement, I can open a separate issue for that and take a glance on it) I've took a look at the example of @HansKre and indeed, it works slowly for the bigger number of elements. However, it's not only about the rendering itself, it's about switching between the tabs of the What do you think about it? |
I'd love to see a PR! We require at least React 18 so that should work. |
Sure, I'll see what I can do and link a PR with it if I solve it |
@djhi I've taken a deep dive into this issue and it looks like this might be the bigger issue than I thought it would be - in the code, there is the following part of it stated in comments in the file Also, regarding the @HansKre issue, I took a look at his example and was concerned whether for long lists and tables, react-admin implements some kind of a list virtualization or any analogical solution? I think this would also improve the performance |
@SKupisz Thank you for taking a look into this.
This doesn't cover the case when a tab the user has not yet opened contains an error.
IMHO this is bad UX. The user should not be prevented to change tabs, even if the current tab is invalid. That kind of behavior would fit more to a wizard-step form, but tabbed forms are not necessarily wizard forms.
While I agree with the statement, I thought I'd just mention two solutions react-admin already offers:
|
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: