form_bloc
form_bloc copied to clipboard
Slow rendering with a lot of components as child
Hello and many thanks for this awesome project! I'm writing a page that is basically based on this example:
https://giancarlocode.github.io/form_bloc/#/
(the Built-in Widget). The only difference is that in the example there are only 9 components as child, instead in mine there are 100 elements.
Is there a way to speed up the loading process?
Many thanks!
:) Hello @capriele
Can you tell me the name of the example, the urls are bug for now :(.
Do you have a minimum example where I can see the error?
Do all your fields have validators?
I think it may be due to subscriptions to keep the form state up to date, maybe I can increase performance :)
Yes, the name of the example is "Built-in Widget". (its source link is this: https://github.com/GiancarloCode/form_bloc/blob/master/form_bloc_web/lib/examples/all_fields_form.dart) You can reproduce the performance issue simply increasing the number of children (row 112: https://github.com/GiancarloCode/form_bloc/blob/master/form_bloc_web/lib/examples/all_fields_form.dart#L112)
Many thanks!
@GiancarloCode I can update the post saying that this problem occurs only when you build the app. in debug mode. On a release version the problem vanishes.