Project

General

Profile

Actions

Bug #63728

closed

Bug #63692: Memory consumption while bulk inserting

Unnecessary calls to BackendUtility->getTCAtypeValue in DataHandler->fillInFieldArray

Added by Stephan Großberndt over 9 years ago. Updated over 5 years ago.

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

100%

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

Description

DataHandler->fillInFieldArray fetches $theTypeString = BackendUtility::getTCAtypeValue for each record but uses this value only if
  • is_array($types_fieldConfig)
  • !$this->dontProcessTransformations
  • isset($fieldArray[$vconf['field']])
  • (string) $incomingFieldArray[('_TRANSFORM_' . $vconf['field'])] == 'RTE'
// Checking for RTE-transformations of fields:
$types_fieldConfig = BackendUtility::getTCAtypes($table, $currentRecord);
$theTypeString = BackendUtility::getTCAtypeValue($table, $currentRecord);
if (is_array($types_fieldConfig)) {
    foreach ($types_fieldConfig as $vconf) {
        // Write file configuration:
        // inserted array_merge($currentRecord,$fieldArray) 170502
        $eFile = \TYPO3\CMS\Core\Html\RteHtmlParser::evalWriteFile($vconf['spec']['static_write'], array_merge($currentRecord, $fieldArray));
        // RTE transformations:
        if (!$this->dontProcessTransformations) {
            if (isset($fieldArray[$vconf['field']])) {
                // Look for transformation flag:
                switch ((string) $incomingFieldArray[('_TRANSFORM_' . $vconf['field'])]) {
                    case 'RTE':
                        $RTEsetup = $this->BE_USER->getTSConfig('RTE', BackendUtility::getPagesTSconfig($tscPID));
                        $thisConfig = BackendUtility::RTEsetup($RTEsetup['properties'], $table, $vconf['field'], $theTypeString);

Instead of calling this function unconditionally it should only be called if a first RTE with transformations is detected and be cached then.

Actions

Also available in: Atom PDF