Slow gui performance with many fields in <form> VS single fields with each assigned the dataContainer

I have to display many fields in a detail view and used the cuba-generated browse-edit Screens.

The screen has about 80+ fields from just one entity. The table-screen renders in normal time, but when opening the edit-screen it takes about 10 sec. Reducing the number of fields resulted in a much better performance.

After searching quite a while for problems in the views or database, I took all fields out of the structure and gave every field its own dataContainer-setting. This increases the performance a lot. The opening of the editor reduced to ~1sec.

Is there so much overhead in the form-processing? Is there a drawback when I use the edit-form without the element?

I am using cuba-platform version 7.2.16


Sorry, I just saw that the actual point of the Question disappeared somehow :frowning:
The problem seems to be that the Fields are grouped within the <form>-Tag.
When I place the fields outside the <form> it works like it should.

Is it a bug or just some overhead for creating the label/field generation?
Any Ideas why this happens?


no ideas anyone?

Once again the Question: What makes screens with many elements within a form-Tag so much slower than handling the elements outside the form-Tag?



Sorry for a long replay. I’ve tried to reproduce the performance issue, but in my case, screen opens fast enough. Could you please attach a demo project that reproduces the problem? Or at least, share your screen and Entity definitions.


Thank you for the demo project. I admit that screen with a form loads slower than without it, but in my case it takes less than a sec, so still comfortable time.

Values from perfstat-ui.log:

Performance Statistics   2022-07-21 13:50:00 - 2022-07-21 13:52:00
Tag                                                  Avg(ms)         Min         Max     Std Dev       Count
refintegrity_RechPos.edit#afterShow                      0.0           0           0         0.0           9
refintegrity_RechPos.edit#beforeShow                    29.3           9          50        14.8           9
refintegrity_RechPos.edit#create                         0.2           0           2         0.6           9
refintegrity_RechPos.edit#init                           0.0           0           0         0.0           9
refintegrity_RechPos.edit#inject                         0.0           0           0         0.0           9
refintegrity_RechPos.edit#load                          12.3          10          15         1.8           9
refintegrity_RechPos.edit#uiPermissions                  0.0           0           0         0.0           9
refintegrity_RechPos.edit#xml                            0.0           0           0         0.0           9

The most possible reason is that the Form component have to calculate component position since it support adding components by index, can have several columns and rowspan/colspan settings for them.

As an option you can use TabSheet with lazy loading and separate fields between different tabs.