[TASK] Performance: Avoid using array_keys in foreach 73/35373/8
authorMathias Schreiber <mathias.schreiber@wmdb.de>
Mon, 29 Dec 2014 08:39:57 +0000 (09:39 +0100)
committerJigal van Hemert <jigal.van.hemert@typo3.org>
Mon, 29 Dec 2014 18:41:26 +0000 (19:41 +0100)
commitbc0805489edae151170ceba655996b3b7caced66
treed1ca1761103a83276b02dc05554417732bab395d
parentc298539a92c056b0120ce6d3523b12378f2b6746
[TASK] Performance: Avoid using array_keys in foreach

This lowers the memory usage.

Iterate on the original array instead of an array_keys()-copy
which lowers memory usage and enhances performance.

Change-Id: If65fae1665e242667d621f086a55a22a8d5309ed
Resolves: #64004
Releases: master, 6.2
Reviewed-on: http://review.typo3.org/35373
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
22 files changed:
typo3/sysext/backend/Classes/Form/FormEngine.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/core/Classes/Cache/Backend/TransientMemoryBackend.php
typo3/sysext/core/Classes/Cache/CacheManager.php
typo3/sysext/core/Classes/Category/CategoryRegistry.php
typo3/sysext/core/Classes/Core/ClassLoader.php
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Classes/Package/DependencyResolver.php
typo3/sysext/core/Classes/Package/PackageManager.php
typo3/sysext/core/Classes/Page/PageRenderer.php
typo3/sysext/core/Classes/Utility/ArrayUtility.php
typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php
typo3/sysext/core/Resources/PHP/TYPO3.Flow/Classes/TYPO3/Flow/Package/PackageManager.php
typo3/sysext/core/Tests/FunctionalTestCaseBootstrapUtility.php
typo3/sysext/core/Tests/Unit/Resource/FileReferenceTest.php
typo3/sysext/extensionmanager/Classes/Utility/ListUtility.php
typo3/sysext/fluid/Classes/Core/Parser/TemplateParser.php
typo3/sysext/impexp/Classes/ImportExport.php
typo3/sysext/recycler/Classes/Domain/Model/Tables.php
typo3/sysext/rtehtmlarea/Classes/Hook/Install/DeprecatedRteProperties.php
typo3/sysext/workspaces/Classes/Hook/DataHandlerHook.php
typo3/sysext/workspaces/Classes/Service/AdditionalColumnService.php