The goal of this PR is to add memoization back to the donu simulate fetch. This will make the simulate view more responsive by eliminating most redundant API calls to donu and solves issue #297. To test, ensure the simulate page is working properly, one should notice a slight increase in responsiveness particularly with a large number of runs.
In order to address previous concerns with the current memoization system with high memory usage and memory leaks, the system was modified to track the size of each entry stored in bytes and limit the total amount of memory consumed by the store to a specified number of bytes. If the store fills up it will drop entries starting from the first one stored until there is sufficient space for a new entry to be stored.
The two parameters controlling the behaviour of the memoization store are the storeSizeLimit (discussed above) limiting the total size of the store; and the storeEntryLimit limiting the size of each entry. If an item exceeds the storeEntryLimit it is not stored at all.
The goal of this PR is to add memoization back to the donu simulate fetch. This will make the simulate view more responsive by eliminating most redundant API calls to donu and solves issue #297. To test, ensure the simulate page is working properly, one should notice a slight increase in responsiveness particularly with a large number of runs.
In order to address previous concerns with the current memoization system with high memory usage and memory leaks, the system was modified to track the size of each entry stored in bytes and limit the total amount of memory consumed by the store to a specified number of bytes. If the store fills up it will drop entries starting from the first one stored until there is sufficient space for a new entry to be stored.
The two parameters controlling the behaviour of the memoization store are the
storeSizeLimit
(discussed above) limiting the total size of the store; and thestoreEntryLimit
limiting the size of each entry. If an item exceeds thestoreEntryLimit
it is not stored at all.