#22085List module eats up tons of memory if displaying records with many references
Description
Problem:
The list module is very wasteful in memory if handling rows with many references. It loads a SELECT * from sys_refindex for every displayed row of a table to a local class array, just to show a count() and a cropped title tag of the gathered data.
Solution:
- Introduce a new method with a db query to count and store already calculated counts of referenced records in a local array (local caching during runtime).
- Introduce a new method to fetch referenced records from db as long as crop length for title tag has not been reached, stop then and free query result
- Use new methods within the list module code and deprecate old ones
Notes:
This improvement dropped memory consumption of the list module for a page listing a fe_group row, referenced by 45.0000 fe_users, from ~270MB down to ~10MB. The parsetime dropped from ~1800ms to ~130ms.
(issue imported from #M13471)
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.