Edit view very slow with 100 fields

Today i started to migrate an application from grails to cuba because i have use it in other projects and it is very easy to learn and i can have a working solutions without problems

But today i have created an Entity with 100 fields using postgres like db.

The strange thing is that with an empty db using the screens created with the wizard from the Entity Designer, when i try to create a new record, the browser hangs for 45 seconds and after this long timeout the screen appear to me and i am able to insert data

Same thing when i edit the record created

I am using cuba platform 7.2.17,but same thing with other versions

Same postgres server with other db and other cuba projects with a lot of records on the same pc works fine and is very fast

Some idea about the problem?

Hi Tommaso,

Are these 100 fields simple data types or references to other entities? In the latter case, how many options containers/loaders do you have in this screen?

Also, check out logs:

  • in deploy/app_home/logs/perfstat.log, you can see what phase of the screen lifecycle takes much time
  • set eclipselink.sql logger to DEBUG (see Useful Loggers) and watch the SQL statements and their execution time.

Hi Konstantin
Sorry for answering late,but i have got some problem
First of all all the fields are simple data with no data on the generated table. I have tried using Mysql and Postgres and nothing changed… The Edit screen is very very slow to display

Here below the logs but i am not able to find any problem
perfstat-ui-log
Performance Statistics 2022-01-22 19:16:00 - 2022-01-22 19:18:00
Tag Avg(ms) Min Max Std Dev Count
MenuItem.siconfidi_Anagrafica.browse 2673,0 2673 2673 0,0 1
login#afterShow 0,0 0 0 0,0 2
login#beforeShow 2,5 0 5 2,5 2
login#create 159,5 0 319 159,5 2
login#init 15,5 0 31 15,5 2
login#inject 35,5 0 71 35,5 2
login#load 552,0 5 1099 547,0 2
login#uiPermissions 1,5 0 3 1,5 2
login#xml 11,5 0 23 11,5 2
main#afterShow 9,0 9 9 0,0 1
main#beforeShow 0,0 0 0 0,0 1
main#create 21,0 21 21 0,0 1
main#init 43,0 43 43 0,0 1
main#inject 16,0 16 16 0,0 1
main#load 400,0 400 400 0,0 1
main#uiPermissions 0,0 0 0 0,0 1
main#xml 3,0 3 3 0,0 1
siconfidi_Anagrafica.browse#afterShow 0,0 0 0 0,0 1
siconfidi_Anagrafica.browse#beforeShow 80,0 80 80 0,0 1
siconfidi_Anagrafica.browse#create 32,0 32 32 0,0 1
siconfidi_Anagrafica.browse#init 2,0 2 2 0,0 1
siconfidi_Anagrafica.browse#inject 1,0 1 1 0,0 1
siconfidi_Anagrafica.browse#load 2258,0 2258 2258 0,0 1
siconfidi_Anagrafica.browse#uiPermissions 0,0 0 0 0,0 1
siconfidi_Anagrafica.browse#xml 7,0 7 7 0,0 1
siconfidi_Anagrafica.edit#afterShow 1,0 1 1 0,0 1
siconfidi_Anagrafica.edit#beforeShow 20,0 20 20 0,0 1
siconfidi_Anagrafica.edit#create 3,0 3 3 0,0 1
siconfidi_Anagrafica.edit#init 3,0 3 3 0,0 1
siconfidi_Anagrafica.edit#inject 6,0 6 6 0,0 1
siconfidi_Anagrafica.edit#load 1017,0 1017 1017 0,0 1
siconfidi_Anagrafica.edit#uiPermissions 0,0 0 0 0,0 1
siconfidi_Anagrafica.edit#xml 6,0 6 6 0,0 1

perfstat.log

Performance Statistics 2022-01-22 19:17:00 - 2022-01-22 19:18:00
Tag Avg(ms) Min Max Std Dev Count
LoadClass 2,7 0 6 2,3 6
Messages.searchClasspath 0,2 0 50 1,1 2664
Messages.searchFiles 0,0 0 0 0,0 2664
ViewRepository.init.ViewRepositoryClientImpl 28,0 28 28 0,0 1
ViewRepository.init.ViewRepositoryImpl 29,0 29 29 0,0 1

Performance Statistics 2022-01-22 19:18:00 - 2022-01-22 19:19:00
Tag Avg(ms) Min Max Std Dev Count

Performance Statistics 2022-01-22 19:19:00 - 2022-01-22 19:20:00
Tag Avg(ms) Min Max Std Dev Count

Performance Statistics 2022-01-22 19:20:00 - 2022-01-22 19:21:00
Tag Avg(ms) Min Max Std Dev Count

No logs problem on the query…answers are in 2 ms

If i reduce the fields to 50 i can see the form in 2 seconds.so seems to be the number of fields the problem

Perhaps the time is spent in the browser JS code rendering the form. You can see it in Vaadin console which appears if you add debug parameter to the URL, for example http://localhost:8080/app/?debug.

If so, try to add a tabsheet to the edit screen and place your edit fields on different tabs.

I can confirm that using a TABSHEET every is working fine

Thank you for the support