We’re currently using aurelia in a medium large application and we’re seing our computed properties being executed each time they are being accessed and not only every time their dependencies change.
Is this correct behaviour? I would expect that since we are declaring the dependencies of the getter, we could memoize the function based on the values of the dependencies.
I’m also noticing that the getter functions are invoked the number of times they are called + 1.
In v1, we don’t replace the getter decorated witt @computedFrom, that’s why you are seeing this behavior, because it’s not possible to cache without wrapping the getter.
In the plugin you mentioned, the getter is wrapped and it’s able to cache it. In v2, this should also be the default behavior. I’m refactoring a few bits around observation system to enable this.