Bug #22085
closedList module eats up tons of memory if displaying records with many references
0%
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)
Files
Updated by Christian Kuhn almost 15 years ago
Attached is a first hack up which still needs some improvements to be core-ready.
As this probably won't make it to 4.3 I propose the patch for 4.4 only, and change the part in setReferences() "SELECT *" to "SELECT only needed fields" for 4.3, which already dropped memory consumption from 270MB to ~100MB.
Updated by Christian Kuhn over 14 years ago
- Committed 02_4-3 to 4.3 rev. 7402
- Committed 04_trunk to trunk rev. 7403