We have some useless optimizations in the code, that qualify for removing:
intermodel transitive reduction: This is meant to lower touching tables/fields, if they occur multiple times in an update tree, e.g. A.name --> [Target.f, ...] --> Target.f would get reduced to A.name --> [...] --> Target.f avoiding a second update on Target.f. While this sounds like a good idea in theory, it actually has downsides:
ppl dont use more complicated cfs dependencies, that would qualify for that sort of optimization, thus it is hardly applied
the reduction does not account for the record dimension later during the updates, in fact it makes it impossible to exit the update tree earlier, if all tainted fields X rows did not change value
So while we optimized for a very special dependency case, we actually de-optimized the more general use case.
Solution: Remove transitive reduction from intermodel tree, instead apply early tree exit, if change count dropped to zero.
The pickled resolver map does not help much. The pickled map was made mainly to speedup startup time. Turns out that the graph calculation costs are negligible - even for the complicated cf setup in the test models the graph steps account only for 15% of the total startup time. In real world projects the cf setups are much smaller with less deep nested intermodel deps, which reduces graph runtime exponentially. Furthermore no one really uses this setting, so it is better to get rid of the loading/checking nuisance in the resolver.
We have some useless optimizations in the code, that qualify for removing:
intermodel transitive reduction: This is meant to lower touching tables/fields, if they occur multiple times in an update tree, e.g.
A.name --> [Target.f, ...] --> Target.f
would get reduced toA.name --> [...] --> Target.f
avoiding a second update onTarget.f
. While this sounds like a good idea in theory, it actually has downsides:So while we optimized for a very special dependency case, we actually de-optimized the more general use case. Solution: Remove transitive reduction from intermodel tree, instead apply early tree exit, if change count dropped to zero.