vimalkumar010
(Vimalkumar Velayutham)
November 30, 2020, 7:31am
#1
Hi…
My project has 200+ Attributes in some entities, All the editor screen of the big entities takes almost 5+ minutes to load, Sometimes, application hanging. All the attributes of the entities are the following datatypes(String, Integer, Double, Boolean and Date). The Entities don’t have associations and compositions to other entities.
I am using the _local view for the entity on Editor Screen.
Please help me how to improve the performance of my Project.
Thanks…
vimalkumar010
(Vimalkumar Velayutham)
December 1, 2020, 1:11am
#2
Hi…
The following is the size of the Entity. All the 3 Entity takes too long to show the page.
Entity Name: Project
Attributes Count: 194
Used Attributes Types String, Integer, Double, Date
Entity Name: Activity
Attributes Count: 210
Used Attributes Types String, Integer, Double, Date
Entity Name: CBS
Attributes Count: 171
Used Attributes Types String, Integer, Double, Date
Note : Even it takes too long and sometimes hangs when i try to open using EntityInspector.
albudarov
(Alexander Budarov)
December 1, 2020, 6:41am
#3
Hi,
Which CUBA version do you use?
The similar problem has been fixed in 7.2.9 release:
opened 11:48AM - 05 Oct 20 UTC
closed 12:16PM - 08 Oct 20 UTC
type: performance
state: fixed
ver: 7.3.0
ver: 7.2.9
<!--
Please use https://www.cuba-platform.com/discuss for discussion, support,… and reporting problems about CUBA Studio.
This repository is only for issues of the CUBA platform core framework.
When creating an issue, provide as much as possible of the following information:
-->
### Environment
- Platform version: 7.2-SNAPSHOT
### Description of the bug or enhancement
Our project has editor screens with many components: labels, text fields etc. Currently we have big performance problems with opening such screens.
Root of the problem is autowiring web components to the spring context, introduced in the ticket https://github.com/cuba-platform/cuba/issues/1351
For example in our case method WebUiComponents#create() is executed approx. 300 times (which leads to the autowiring 300 beans - WebUiComponents#autowireContext) during the screen components loading, increasing time by 714 ms according to the perfstat logs and visualVm:

Also to prove that this is a huge problem for us, i've attached a .nps snapshot ([autowireProblem.zip](https://github.com/cuba-platform/cuba/files/5327116/autowireProblem.zip) captured using jvisualvm) from the test environment during performance test execution (opening main window and editor multiple times with several threads were performed).
In this snapshot you can see that the 6 sec from the 12 (snapshot time) cpu is spend executing create() method

vimalkumar010
(Vimalkumar Velayutham)
December 1, 2020, 6:46am
#4
Hi Alex,
I am using the version: 7.2.10
albudarov
(Alexander Budarov)
December 1, 2020, 8:33am
#5
Well, the amount of attributes is very big anyway.
The common way in CUBA to make editors less heavier is to decompose editor forms into tabsheet with lazy tabs:
https://doc.cuba-platform.com/manual-7.2/gui_TabSheet.html?#gui_TabSheet_tab_lazy
1 Like