Bug #63812
Bug #63692: Memory consumption while bulk inserting
Lower memory use in ArrayUtil->mergeRecursiveWithOverrule
Status: | Resolved | Start date: | 2014-12-12 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Stephan Großberndt | % Done: | 100% |
|
Category: | Performance | Spent time: | - | |
Target version: | next-patchlevel | |||
TYPO3 Version: | 6.2 | Is Regression: | No | |
PHP Version: | Sprint Focus: | |||
Complexity: | no-brainer |
Description
Currently ArrayUtil->mergeRecursiveWithOverrule uses foreach (array_keys($overrule) as $key) to iterate the keys. This means a new array consisting only of the keys has to be created which costs performance and memory:
static public function mergeRecursiveWithOverrule(array &$original, array $overrule, $addKeys = TRUE, $includeEmptyValues = TRUE, $enableUnsetFeature = TRUE) { foreach (array_keys($overrule) as $key) {
Replacing this with
foreach ($overrule as $key => $unusedValue)
drastically lowers memory usage and enhances performance.
Related issues
Associated revisions
[TASK] Lower memory use in ArrayUtil->mergeRecursiveWithOverrule
Iterate on the original array instead of an array_keys()-copy in
ArrayUtil->mergeRecursiveWithOverrule which lowers memory usage and
enhances performance.
Resolves: #63812
Releases: master, 6.2
Change-Id: I71acc9e1e730f1e782d0e74acd45637ce1b9f08e
Reviewed-on: http://review.typo3.org/35351
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
[TASK] Lower memory use in ArrayUtil->mergeRecursiveWithOverrule
Iterate on the original array instead of an array_keys()-copy in
ArrayUtil->mergeRecursiveWithOverrule which lowers memory usage and
enhances performance.
Resolves: #63812
Releases: master, 6.2
Change-Id: I71acc9e1e730f1e782d0e74acd45637ce1b9f08e
Reviewed-on: http://review.typo3.org/35535
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
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/35351
#2 Updated by Mathias Schreiber 8 months ago
- Parent task set to #63692
#3 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/35351
#4 Updated by Gerrit Code Review 8 months 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/35351
#5 Updated by Gerrit Code Review 8 months 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/35351
#6 Updated by Gerrit Code Review 8 months ago
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/35373
#7 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/35373
#8 Updated by Gerrit Code Review 8 months 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/35373
#9 Updated by Gerrit Code Review 8 months 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/35373
#10 Updated by Gerrit Code Review 8 months 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/35373
#11 Updated by Gerrit Code Review 8 months ago
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/35535
#12 Updated by Stephan Großberndt 8 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset babd2626f2be330ba788026d97b74f0e5458bea3.