My cuba is slow

My cuba is hanging when I click save button…
is this memory stats ok
image

Hi,
There are many reasons why your application could become slow.

If the problem is because of too many requests to the DB, or if the database is slow - you will be able to detect it by changing the eclipselink.sql logger to debug level:
https://doc.cuba-platform.com/manual-7.2/logging_useful_loggers.html

Thank you @AlexBudarov for pointing me to the log configurations. Here is my scenario and my findings:

I have two entities orderHeader and orderItem with one-many composition relation.

Below is my orderHeader Editor xml

<data>
    <instance id="orderHeaderDc"
              class="com.demo.entity.OrderHeader"
              view="orderHeader-view">
        <loader id="orderHeaderDl"/>
    </instance>
    <collection id="orderItemsDc" class="com.demo.entity.OrderItem" >
        <loader id="orderItemsDl"> <query> <![CDATA[select e from demo_OrderItem e where e.orderHeader = :header AND e.validFrom>= CURRENT_DATE ]] ></query>
        </loader>
    </collection>
</data>

<dialogMode height="600"
            width="800"/>
<layout expand="itemBox" spacing="true">
    <form id="form" dataContainer="orderHeaderDc">
        <column width="400px">
           <lookupField id="customerNameField" property="customerName"/>
            <lookupField id="countryField" property="country"/>
        </column>
    </form>
    <groupBox id="itemBox" caption="Orders" expand="itemTable">
        <table id="itemTable" dataContainer="orderItemsDc" width="100%" editable="true">
            <actions>
                <action id="create" type="create"/>
                <action id="edit" type="edit"/>
            </actions>
            <columns>
                <column id="product"/>
                <column id="unitPrice"/>
                <column id="quantity" editable="true"/>
                <column id="validFrom"/>
            </columns>
            <buttonsPanel>
                <button action="itemTable.create"/>
                <button action="itemTable.edit"/>
            </buttonsPanel>
        </table>
    </groupBox>
    <hbox id="editActions" spacing="true">
        <button action="windowCommitAndClose"/>
        <button action="windowClose"/>>
    </hbox>
</layout>

and this is the orderHeader controller.

@ UiController(“demo_OrderHeader.edit”)
@ UiDescriptor(“orderHeader-edit.xml”)
@ EditedEntityContainer(“orderHeaderDc”)
@ LoadDataBeforeShow
public class OrderHeaderEdit extends StandardEditor {

@Inject
private CollectionLoader<orderItem> orderItemsDl;
@Inject
private InstanceLoader<OrderHeader> orderHeadersDl;

@Subscribe
private void onBeforeShow(BeforeShowEvent event) {
    orderHeaderDl.load();

}

@Subscribe(id = "orderHeaderDc", target = Target.DATA_CONTAINER)
private void onOrderHeaderDcItemChange(InstanceContainer.ItemChangeEvent<OrderHeader> event) {
    orderHeadersDl.setParameter("header", event.getItem());
    orderHeadersDl.load();
}

}

Here is what is happening: when I’m on this screen, if I edit orderItem record(s) “quantity field” in the table and click “OK” the system hangs and times out because of “outOfMemory: GC”. the orderItem has +600 records but only one record has been edited.
if I edit orderItem record from “orderItem Editor” screen everything works fine.
Maybe you can enlighten me a bit how cuba handles edited records from browser screen.

Well, this seems like a CUBA bug if it is reproduced as simply as you described.
Which CUBA version do you use?

And can be the problem reproduced if you create a new small project with just these two entities and the minimal set of screens?