Hello!

We currently have a performance problem with RO in production environment
with one of our actions.

This action (SalesOrderRestMenu#filter) returns a list of view models
(SalesOrderView) and the client-side, an SPA, invokes this action accepting
simplified representation (Accept header set to
"application/json;profile=urn:org.apache.isis/v1;suppress=true"). When this
action returns around 601 items, it takes ~16 seconds on my development
machine to process. Profiling shows that Clause#getValueOf consumes 12
seconds of this CPU time needed to complete the request [1].

Any help on how to improve this is highly appreciated!

This is how the view model looks like:

@DomainObject(nature = Nature.INMEMORY_ENTITY)
public class SalesOrderView {

    //region > constructors
    public SalesOrderView() {
    }

    public SalesOrderView(final SalesOrder salesOrder) {
        setSalesOrder(salesOrder);
    }

    public SalesOrderView(
            final SalesOrder salesOrder,
            final String wholesaler,
            final String retailer,
            final String courier,
            final BigDecimal total) {
        setSalesOrder(salesOrder);
        setWholesaler(wholesaler);
        setRetailer(retailer);
        setCourier(courier);
        setTotal(total);
    }
    //endregion

    //region > salesOrder (property)
    @Property(hidden = Where.EVERYWHERE)
    @Getter @Setter
    private SalesOrder salesOrder;
    //endregion

    //region > wholesaler (property)
    @Getter @Setter
    private String wholesaler;
    //endregion

    //region > retailer (property)
    @Getter @Setter
    private String retailer;
    //endregion

    //region > courier (property)
    @Getter @Setter
    private String courier;
    //endregion

    //region > total (property)
    @Getter @Setter
    private BigDecimal total;
    //endregion

    //region > derived properties
    public String getId() {
        return getSalesOrder().getId();
    }

    public String getSalesOrderNumber() {
        return getSalesOrder().getSalesOrderNumber();
    }

    public LocalDate getOrderDate() {
        return getSalesOrder().getOrderDate();
    }

    public LocalDate getShipmentDate() {
        return getSalesOrder().getShipmentDate();
    }

    public LocalDate getDeliveryDate() {
        return getSalesOrder().getDeliveryDate();
    }

    public Status getStatus() {
        return getSalesOrder().getStatus();
    }

    public String getRemarks() {
        return getSalesOrder().getRemarks();
    }
    //endregion

}


Best regards,
Willie


[1] http://imgur.com/a/NlDel

Reply via email to