Evaluation Algorithm of a Derived Data Member
The evaluation of a derived member relies on an algorithm that has the following properties:
It does not allow dependence cycles. It detects and reports them dynamically: an exception of type
IlsCycle is thrown.
A derived member is re-evaluated only if it is eager or if its re-evaluation is required to recompute another derived data member that transitively depends on it. For more information, see the previous section
Eager Versus Lazy Derived Data Members.
A derived member is re-evaluated only if active Server data—that is, entries, relations, or other derived data members—on which it depends have been modified.
A given derived member is evaluated at most once during a re-evaluation.
A derived member that is neither directly nor transitively eager will be re-evaluated only if it is accessed explicitly.
The evaluation algorithm behaves incrementally because it caches derived members as it computes them. Derived data members are not recalculated unless they need to be. In particular, derived members that are needed more than once during an evaluation are evaluated only once and the evaluation algorithm can thus improve its response time.
Since it uses the system stack, the algorithm can be traced or debugged with a conventional debugger.
Important: During evaluation of a derived attribute, Rogue Wave® Server establishes a dependency graph, which replaces any previously computed graph if the derived attribute has already been evaluated. Only the sensitive elements accessed during computation will be part of the new dependency graph. You should take this characteristic into account when implementing your evaluation algorithm, to ensure that your dependency graph is consistent with your needs. You should also be aware of how performance may be affected if your derived attribute potentially depends on a large set of objects. |
Version 6.3
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.