[BUGFIX] Don’t do greedy merges in extension scanner 02/58302/2
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Mon, 17 Sep 2018 11:04:55 +0000 (13:04 +0200)
committerSusanne Moog <susanne.moog@typo3.org>
Tue, 18 Sep 2018 07:22:33 +0000 (09:22 +0200)
commit438332908f7051ff6fc15ad6aba96ecc031a971a
tree3d1818418eaf21144fe08d184b440029b7df2b21
parentbae520c6b2c791a9205deaa06e86c496f1cb91a6
[BUGFIX] Don’t do greedy merges in extension scanner

The extension scanner merges all matches into an array. This is done in a
loop, which is pretty greedy as it impacts CPU and RAM.

Instead, it's possible to do a single array_merge() at the end of the
loop.

See this document for reference:
https://github.com/kalessil/phpinspectionsea/blob/master/docs/performance.md#slow-array-function-used-in-loop

Resolves: #86282
Releases: master
Change-Id: I09b45468dfd9f60ce6bd9e264ecfc3cbfcb54fa1
Reviewed-on: https://review.typo3.org/58302
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/install/Classes/Controller/UpgradeController.php