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 almost 10 years ago. Updated about 6 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 #1

Updated by Gerrit Code Review almost 10 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35227

Actions #2

Updated by Wouter Wolters almost 10 years ago

  • Parent task set to #63692
Actions #3

Updated by Mathias Schreiber almost 10 years ago

  • Parent task deleted (#63692)
Actions #4

Updated by Mathias Schreiber almost 10 years ago

  • Parent task set to #63692
Actions #5

Updated by Gerrit Code Review almost 10 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35227

Actions #6

Updated by Stephan Großberndt almost 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #7

Updated by Gerrit Code Review almost 10 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37575

Actions #8

Updated by Stephan Großberndt almost 10 years ago

  • Status changed from Under Review to Resolved
Actions #9

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF