ynorth-projects / openy_repeat

Decouple openy_repeat.
1 stars 17 forks source link

Free entity.memory_cache so that it doesn't consume too much memory #33

Closed AndreyMaximov closed 1 year ago

AndreyMaximov commented 1 year ago

Addresses https://github.com/ynorth-projects/openy_repeat/issues/32

OpenyRepeatRepository::getLocations() method tends to get most session nodes loaded. This makes the entity memory cache service consume too much memory.

Solution: Clearing the cache after each chunk of session nodes is loaded keeps the memory consumption low.

The peak memory usage in the test scenario with ~6500 session nodes without the fix is ~360 Mb. With the fix, it drops down to ~70 Mb.