Change
Remove old ResultCache
Issue description
Before dobjects there was a simple mechanism to cache the results of a method call on a Tobject. This is no longer necessary and the removal would simplify the code.
Developer comments
It seems that removing the ResultCache performed an unintended performance optimization with an enormous effect. A notoriously slow daily import job ran on July 23rd still for *1 hour*. As of July 24th it took merely *1 min*. Another import job took *12 hours* up to the 23rd and then *3 minutes* on the 24th. Between those two dates no OS update was performed and Topincs *10.1.0build1032* was installed on July 24th. The code in the store of the was not touched between. The SQL counts are comparable and in any case low (~3000).
Here is my explanation: in an import job most of the calls are modifying. Upon modification the result cache gets wiped. Since every tobject has its own private instance of ResultCache, the wiping depends on how many tobjects are in memory. In an import job these are many, since basically a complete online shop system gets imported. So for every modifying method call 1 Mio tobjects get their result cache cleaned for no reason whatsoever since most likely there was no reading method call in between anyway. Every call within the service is a set call which gets stalled by iterating over a large array setting a value that already is there, the empty array.
Note: this result cache was put in place long before switching to dobjects. But i never thought it would cause any harm, so i left it in there. Boy was i wrong. It had its purpose in non-dobject stores to avoid repeated reads from MySQL. Mid year i decided to eliminate those and make everything dobject and in-memory, so there was no more need for ResultCache.
|
Work sessions
| Start |
2026-07-24T11:11:40
|
| End |
2026-07-24T11:23:58
|
| Participant |
Robert Cerny
|
|
We are sorry
This page cannot be displayed in your browser. Use Firefox, Opera, Safari, or Chrome instead.