Project

General

Profile

Actions

Bug #60494

closed

editing gridelement in foreign language exhausts memory on large sites

Added by Martin Schnabel almost 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2014-07-23
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I have a site with very many pages. tt_content has about 14000 rows. When editing a gridelement in a foreign language typo3 takes too much memory. I had to set memory_limit to 512M.

With some debugging I found out that the problem is inside TYPO3\CMS\Backend\Utility\BackendUtility::getProcessedValue when it is called for $col = 'tx_gridelements_children'. The array $rParts gets very large because it is filled with all uids of tt_content where tx_gridelements_children is 0. For my site that means about 10000 elements. In the later processing of the uids php runs out of memory.

As a workaground I used the hook inside BackendUtility::getProcessedValue by setting

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_befunc.php']['preProcessValue'][] = '&\WV\ImgReloaded\Hooks\GridElementsFix->preProcessValue';

inside ext_tables.php (inside an extension of mine)

The hook sets the field type to flex that no processing by BackendUtility::getProcessedValue will be done:

<?php

namespace WV\ImgReloaded\Hooks;

// Hook done in ext_tables.php

class GridElementsFix {

    public function preProcessValue(&$params, &$ref) {
        if (is_array($params) && array_key_exists('foreign_field', $params) && $params['foreign_field'] == 'tx_gridelements_container') {
            $params['type'] = 'flex';
        }
    }

}

I know the workaround is ugly. I hope someone can find a better fix.

(I had gridelements rev 1824f01414736595970f12f239fa76f4850288b3)


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #59671: IRRE related child records are not listed (comma separated list) in list moduleClosed2014-06-19

Actions
Actions

Also available in: Atom PDF