[RENDERER] Block unnecessary condition and hide field renders
See original GitHub issueScope: Form renderer
Description Based on this discussion: https://github.com/data-driven-forms/react-forms/discussions/1015#discussioncomment-532730 we have found some performance degradations in massive forms (500+ fields). Altough performance in forms like these will be a bit worse, there is still room for improvement.
This effort will reduce the number of renders for some components and look at why the useFieldApi
hook is not working properly with subscriptions when using conditions and field arrays.
Thanks, @thecodejack for testing the limits of the renderer.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:9 (8 by maintainers)
Top Results From Across the Web
9 tricks to eliminate render blocking resources - LogRocket Blog
By reducing render blocking resources, you can shorten the critical rendering path and reduce page load times, thus improving UX and SEO.
Read more >prevent content hidden with ng-hide from rendering on the ...
I'm somewhat new to angular and have a question about an element that briefly renders on the page before disappearing. I would like...
Read more >5 Ways to Avoid React Component Re-Renderings
In this article, I have discussed 5 different methods to prevent unnecessary re-rendering in React components. Most of these solutions capitalize caching, and ......
Read more >7 Ways to Implement Conditional Rendering in React ...
1. Using an if…else Statement ... An if…else statement will execute the actions contained in the if block when the condition is satisfied....
Read more >Prevent form from rendering - DevExpress Support
For example, if you wish to hide an editor based on a condition, you can put your editor inside a cell template and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Good news. I think I was able to “optimize” the condition rendering triggers. Now we have 1000 (999 have conditions) fields but when we trigger condition, only dependent fields are subjected to re-renders and the condition is still working:
That results in much smoother rendering because it eliminates a lot of renders + the condition evaluation itself.
Edit: here is a preview
There is one mere performance issue with array fields specifically. So I’m gonna have to take a look at that as well. Plus there might be an issue in wizard forms, but we will test it probably today or tomorrow.