Project

General

Profile

Actions

Bug #63812

closed

Bug #63692: Memory consumption while bulk inserting

Lower memory use in ArrayUtil->mergeRecursiveWithOverrule

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

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

100%

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

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 1 (0 open1 closed)

Related to TYPO3 Core - Task #54251: GeneralUtility::array_merge_recursive_overrule has bad performanceClosedMarkus Klein2013-12-06

Actions
Actions #1

Updated by Gerrit Code Review over 9 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/35351

Actions #2

Updated by Mathias Schreiber over 9 years ago

  • Parent task set to #63692
Actions #3

Updated by Gerrit Code Review over 9 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/35351

Actions #4

Updated by Gerrit Code Review over 9 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/35351

Actions #5

Updated by Gerrit Code Review over 9 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/35351

Actions #6

Updated by Gerrit Code Review over 9 years 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

Actions #7

Updated by Gerrit Code Review over 9 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/35373

Actions #8

Updated by Gerrit Code Review over 9 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/35373

Actions #9

Updated by Gerrit Code Review over 9 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/35373

Actions #10

Updated by Gerrit Code Review over 9 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/35373

Actions #11

Updated by Gerrit Code Review over 9 years 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

Actions #12

Updated by Stephan Großberndt over 9 years ago

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

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF