isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik de Hair <e.deh...@pocos.nl>
Subject Re: Always calling getXxx() and hideXxx() both decreases performance of application (?)
Date Mon, 12 Feb 2018 11:48:03 GMT
Hi Dan,

As far as I can see the fix [1] for ISIS-1759 [2] is not merged to 
current release of Apache Isis [3]

[1] https://gitbox.apache.org/repos/asf?p=isis.git;a=commitdiff;h=c6c2fc7
[2] https://issues.apache.org/jira/browse/ISIS-1759
[3] 
https://github.com/apache/isis/blob/master/core/viewer-wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ScalarModel.java#L290

We're upgrading to 1.16.0 now but the issue is still there...

Did I miss something or is the issue not fixed yet?

Thanks,
Erik


On 10/26/2017 12:45 AM, Dan Haywood wrote:
> Raised https://issues.apache.org/jira/browse/ISIS-1759 for this
>
> On Sun, 1 Oct 2017 at 19:52 Dan Haywood <dan@haywood-associates.co.uk>
> wrote:
>
>> Hi Erik,
>> I'll look into this... This doesn't sound right that this version is
>> creating these extra calls into the domain code.
>> Thx,
>> Dan
>>
>> On Wed, 27 Sep 2017, 11:35 Erik de Hair, <e.dehair@pocos.nl> wrote:
>>
>>> Hi,
>>>
>>> I'm not really sure about this but it feels like our app's performance
>>> (Apache Isis 1.15.0) is worse than before and I believe it might be
>>> because of the fact that the getter and hide method of a property are
>>> called both, despite the fact that the property is hidden.
>>>
>>> We have a (derived) property (or referenced property) defined like this:
>>>
>>> public String getX(){
>>>       return someService.createX(getY(), getZ()); // We don't want this
>>> method to be called always, because it's an expensive one
>>> }
>>> public boolean hideX(){
>>>       boolean condition = ... // some condition
>>>       return condition;
>>> }
>>>
>>> In 1.14.0 getX() wouldn't be called if the hideX()-method returned true
>>> and so wouldn't the expensive service-method be called. For 1.15.0 we
>>> would have to change the implementation to something like the following
>>> to make sure the expensive call wouldn't be executed:
>>>
>>> public String getX(){
>>>       if(!hideConditionsForX){
>>>           return someService.createX(getY(), getZ());
>>>       }
>>>       return null;
>>> }
>>> public boolean hideX(){
>>>       return hideConditionsForX();
>>> }
>>> private boolean hideConditionsForX(){
>>>       // ... must probably be implemented using QueryResultsCache to
>>> reduce DB-calls
>>> }
>>>
>>> This is also the case for referenced properties for which no DB-query
>>> has to be executed if it was hidden. This could count up if we have a
>>> lot of hidden properties (this might be solved with refactoring).
>>>
>>> Am I seeing this correctly?
>>>
>>> Erik
>>>
>>>
>>>


Mime
View raw message