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, <[email protected]> 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 > > >
