Project

General

Profile

Actions

Bug #63676

closed

Bug #63692: Memory consumption while bulk inserting

High memory consumption for nonFields in ReferenceIndex->getRelations while bulk inserting

Added by Stephan Großberndt almost 10 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Performance
Target version:
Start date:
2014-12-08
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:

Description

For each call of every record to get Relations from with ReferenceIndex->getRelations

public function getRelations($table, $row, $onlyField = '') {
    // Initialize:
    $uid = $row['uid'];
    $nonFields = explode(',', 'uid,perms_userid,perms_groupid,perms_user,perms_group,perms_everybody,pid');

a static list of nonFields is initialized by exploding a string. Using a property instead

protected $nonRelationFields = array(
    'uid', 'perms_userid', 'perms_groupid', 'perms_user', 'perms_group', 'perms_everybody', 'pid'
);

[...]
if (!in_array($field, $this->nonRelationFields) && is_array($GLOBALS['TCA'][$table]['columns'][$field]) && (!$onlyField || $onlyField === $field)) {
reduced for bulk inserting of 6500 records
  • 10MB less ram used
  • 6500 calls less - obvious :-)
Actions

Also available in: Atom PDF