Request Proccess Very Slow

Hi,

In my order page I have a table for order items the commiting time for this page is over 100 seconds when the amount of items surpass 80 items and can take upto 300 seconds when at nearly 200 items. This is the view used for these items.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<window xmlns="http://schemas.haulmont.com/cuba/window.xsd" caption="msg://editorCaption"
        class="com.alerteqa.car_parts_shop.web.order.OrderEdit" datasource="orderDs" focusComponent="fieldGroup"
        messagesPack="com.alerteqa.car_parts_shop.web.order">
    <dsContext>
        <datasource id="orderDs" class="com.alerteqa.car_parts_shop.entity.Order" view="order-edit-view">
            <collectionDatasource id="itemsDs" property="items"/>
        </datasource>
        <collectionDatasource id="allItemsDs" class="com.alerteqa.car_parts_shop.entity.Item" view="all-items-view">
            <query><![CDATA[select e from cps$Item e]]></query>
        </collectionDatasource>
        <groupDatasource id="currenciesDs" class="com.alerteqa.car_parts_shop.entity.Currency" view="_minimal">
            <query><![CDATA[select e from cps$Currency e]]></query>
        </groupDatasource>
        <groupDatasource id="facilitiesDs" class="com.alerteqa.car_parts_shop.entity.Facility" view="_minimal">
            <query><![CDATA[select e from cps$Facility e]]></query>
        </groupDatasource>
        <collectionDatasource id="facilityDetailsDs" class="com.alerteqa.car_parts_shop.entity.FacilityDetail"
                              view="_minimal">
            <query><![CDATA[select e from cps$FacilityDetail e]]></query>
        </collectionDatasource>
        <groupDatasource id="suppliersDs" class="com.alerteqa.car_parts_shop.entity.Supplier" view="supplier-view">
            <query><![CDATA[select e from cps$Supplier e]]></query>
        </groupDatasource>
        <groupDatasource id="accountsDs" class="com.alerteqa.car_parts_shop.entity.Account" view="_minimal">
            <query><![CDATA[select e from cps$Account e]]></query>
        </groupDatasource>
    </dsContext>
    <dialogMode height="600" width="800"/>
    <layout spacing="true">
        <scrollBox height="100%" spacing="true">
            <fieldGroup id="fieldGroup" datasource="orderDs">
                <column width="250px">
                    <field property="date"/>
                    <field property="company"/>
                    <field property="supplier" optionsDatasource="suppliersDs"/>
                    <field property="account" required="true" optionsDatasource="accountsDs"/>
                    <field property="facility" required="true" optionsDatasource="facilitiesDs"/>
                    <field property="status"/>
                    <field property="currency" optionsDatasource="currenciesDs"/>
                    <field property="exchangeRate"/>
                    <field property="subtotal" editable="false"/>
                    <field property="shipping" required="true"/>
                    <field property="shippingCurrency" optionsDatasource="currenciesDs"/>
                    <field property="shippingExchangeRate" required="true"/>
                    <field property="handling" required="true"/>
                    <field property="handlingCurrency" optionsDatasource="currenciesDs"/>
                    <field property="handlingExchangeRate" required="true"/>
                    <field property="discount" required="true"/>
                    <field property="total" editable="false"/>
                    <field property="reference"/>
                </column>
            </fieldGroup>
            <groupBox id="itemsBox" caption="msg://com.alerteqa.car_parts_shop.entity/Order.items" spacing="true">
                <table id="itemsTable" editable="true" width="100%">
                    <actions>
                        <action id="add" caption="mainMsg://actions.Add" icon="icons/create.png" invoke="addOrderLine"
                                shortcut="F1"/>
                        <action id="remove" caption="mainMsg://actions.Remove" icon="icons/remove.png"
                                invoke="removeOrderLine" trackSelection="true"/>
                    </actions>
                    <columns>
                        <column id="date" collapsed="true"/>
                        <column id="item" editable="true" optionsDatasource="allItemsDs"/>
                        <column id="facility_detail" editable="true" optionsDatasource="facilityDetailsDs"/>
                        <column id="cost" width="70" editable="true"/>
                        <column id="amount" width="70" editable="true"/>
                        <column id="total"/>
                        <column id="createTs" collapsed="true"/>
                    </columns>
                    <rows datasource="itemsDs"/>
                </table>
                <buttonsPanel id="buttonsPanel">
                    <button action="itemsTable.add"/>
                    <button action="itemsTable.remove"/>
                </buttonsPanel>
            </groupBox>
            <frame id="windowActions" height="100%" screen="editWindowActions"/>
            <hbox spacing="true" visible="false">
                <button id="OkBtn" icon="OK" caption="OK" invoke="onOkBtnClick"/>
                <button id="CancelBtn" icon="CANCEL" caption="Cancel" invoke="onCancelBtnClick"/>
            </hbox>
        </scrollBox>
    </layout>
</window>

This is the model view used in itemsDs

 <view class="com.alerteqa.car_parts_shop.entity.Order"
      extends="_local"
      name="order-edit-view">
    <property name="facility"
              view="_local">
        <property name="account"
                  view="_minimal">
            <property name="currency"
                      view="_minimal"/>
        </property>
    </property>
    <property name="supplier"
              view="_minimal">
        <property name="account"
                  view="_minimal"/>
    </property>
    <property name="account"
              view="_minimal">
        <property name="currency"
                  view="_minimal"/>
    </property>
    <property name="currency"
              view="_minimal"/>
    <property name="shippingCurrency"
              view="_minimal"/>
    <property name="handlingCurrency"
              view="_minimal"/>
    <property name="items"
              view="_local">
        <property name="createTs"/>
        <property name="item"
                  view="_minimal">
        </property>
        <property name="facility_detail"
                  view="_minimal">
        </property>
    </property>
    <property name="transaction"
              view="_minimal"/>
</view>

Hi
Is this a problem opening a screen or saving?

Hi,

My problem occurs both however for opening screen was able to get it to an acceptable speed would prefer improvement when you can spot any way to improve and provide better experience, What I am really concerned is about saving the screen takes too long.

Thanks

Hi,

There are no such problems with normal CUBA application.

I’d recommend that you check what is wrong with your application using a profiling tool (JVisualVM, JProfiler). JVisualVM help: VisualVM CPU Sampling