Project

General

Profile

Actions

Bug #22085

closed

List module eats up tons of memory if displaying records with many references

Added by Christian Kuhn almost 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2010-02-09
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

13471_01.diff (5.92 KB) 13471_01.diff Administrator Admin, 2010-02-09 00:46
T3D__17-04-18-36-10-z.t3d (129 KB) T3D__17-04-18-36-10-z.t3d Administrator Admin, 2010-04-17 19:04
T3X_phpqp-0_0_0-z-201004171822.t3x (12.5 KB) T3X_phpqp-0_0_0-z-201004171822.t3x Administrator Admin, 2010-04-17 19:05
13471_02_4-3.diff (496 Bytes) 13471_02_4-3.diff Administrator Admin, 2010-04-17 19:05
13471_02_example.diff (652 Bytes) 13471_02_example.diff Administrator Admin, 2010-04-17 19:05
13471_02_trunk.diff (5.92 KB) 13471_02_trunk.diff Administrator Admin, 2010-04-17 19:06
13471_03_trunk.diff (6.59 KB) 13471_03_trunk.diff Administrator Admin, 2010-04-18 15:04
13471_04_trunk.diff (6.73 KB) 13471_04_trunk.diff Administrator Admin, 2010-04-20 13:54
Actions #1

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.

Actions #2

Updated by Christian Kuhn over 14 years ago

  • Committed 02_4-3 to 4.3 rev. 7402
  • Committed 04_trunk to trunk rev. 7403
Actions

Also available in: Atom PDF