Bug #63735
closedHigh memory consumption in DataHandler->checkValue_SW while bulk inserting
100%
Description
DataHandler->checkValue_SW is a switch function calling the public checkValue_*-functions [checkValue_text, checkValue_input, checkValue_check, checkValue_radio, checkValue_group_select, checkValue_inline, checkValue_flex].
Instead of just passing all parameters needed for those functions some of them are put into an array $PP and passed to the checkValue_*-functions
public function checkValue_SW($res, $value, $tcaFieldConf, $table, $id, $curValue, $status, $realPid, $recFID, $field, $uploadedFiles, $tscPID, array $additionalData = NULL) { [...] $PP = array($table, $id, $curValue, $status, $realPid, $recFID, $tscPID); switch ($tcaFieldConf['type']) { case 'text': $res = $this->checkValue_text($res, $value, $tcaFieldConf, $PP, $field); break;
where in some cases these parameters from $PP are not needed at all (checkValue_text, checkValue_radio) and in others they are separated again by a list()-call and only some of them are used.
public function checkValue_text($res, $value, $tcaFieldConf, $PP, $field = '') { $evalCodesArray = GeneralUtility::trimExplode(',', $tcaFieldConf['eval'], TRUE); $res = $this->checkValue_text_Eval($value, $evalCodesArray, $tcaFieldConf['is_in']); return $res; } public function checkValue_input($res, $value, $tcaFieldConf, $PP, $field = '') { list($table, $id, $curValue, $status, $realPid, $recFID) = $PP;
By putting them in an array they cannot be passed as reference. The function checkValue_SW is called for each field of each record to add or update, leading to lots of memory being used.
The checkValue_*-functions should not get their parameters passed as an array and should take only the parameters necessary.
If for TYPO3 6.2 the signature change is is not possible (they are public), I propose to add new functions checkValue_*-functions with the changed signatures, call those from checkValue_SW and also from the old checkValue_*-functions.
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/35238
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/35238
Updated by Gerrit Code Review almost 10 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35238
Updated by Gerrit Code Review almost 10 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35238
Updated by Gerrit Code Review almost 10 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35238
Updated by Gerrit Code Review almost 10 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35238
Updated by Gerrit Code Review almost 10 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35238
Updated by Gerrit Code Review almost 10 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35238
Updated by Gerrit Code Review over 9 years ago
Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35238
Updated by Gerrit Code Review over 9 years ago
Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35238
Updated by Gerrit Code Review over 9 years ago
Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35238
Updated by Gerrit Code Review over 9 years ago
Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35238
Updated by Stephan Großberndt over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset e1695035a8e2f477a715b9316b267fdff36486f4.
Updated by Oliver Hader over 6 years ago
- Related to Bug #82756: Can't remove access starttime / endtime added