Bug #63728
Bug #63692: Memory consumption while bulk inserting
Unnecessary calls to BackendUtility->getTCAtypeValue in DataHandler->fillInFieldArray
| Status: | Resolved | Start date: | 2014-12-10 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assigned To: | - | % Done: | 100% |
|
| Category: | Performance | Spent time: | - | |
| Target version: | next-patchlevel | |||
| TYPO3 Version: | 6.2 | Is Regression: | No | |
| PHP Version: | Sprint Focus: | |||
| Complexity: |
Description
- 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.
Associated revisions
[BUGFIX] Avoid getTCAtypeValue-calls in DataHandler->fillInFieldArray
DataHandler->fillInFieldArray fetches BackendUtility::getTCAtypeValue
for each record but uses the value only if several RTE-transformation-
related conditions are met.
Fetch BackendUtility::getTCAtypeValue only if the RTE-transformation-
related conditions are met for the first time and keep it afterwards.
Resolves: #63728
Releases: master, 6.2
Change-Id: I14b307c45cab2d778968f3fd98c18348b666be3d
Reviewed-on: http://review.typo3.org/35227
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Benjamin Mack <benni@typo3.org>
Tested-by: Benjamin Mack <benni@typo3.org>
[BUGFIX] Avoid getTCAtypeValue-calls in DataHandler->fillInFieldArray
DataHandler->fillInFieldArray fetches BackendUtility::getTCAtypeValue
for each record but uses the value only if several RTE-transformation-
related conditions are met.
Fetch BackendUtility::getTCAtypeValue only if the RTE-transformation-
related conditions are met for the first time and keep it afterwards.
Resolves: #63728
Releases: master, 6.2
Change-Id: I14b307c45cab2d778968f3fd98c18348b666be3d
Reviewed-on: http://review.typo3.org/37575
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
History
#1 Updated by Gerrit Code Review 8 months 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
#2 Updated by Wouter Wolters 8 months ago
- Parent task set to #63692
#3 Updated by Mathias Schreiber 8 months ago
- Parent task deleted (
#63692)
#4 Updated by Mathias Schreiber 8 months ago
- Parent task set to #63692
#5 Updated by Gerrit Code Review 8 months 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
#6 Updated by Stephan Großberndt 5 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset f6c06bc3dc6c61d3b2b5204ebb7a0ea40828008d.
#7 Updated by Gerrit Code Review 5 months 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
#8 Updated by Stephan Großberndt 5 months ago
- Status changed from Under Review to Resolved
Applied in changeset 9f462369487049371d480c6c744b3943ac2860da.