[TASK] Make DiffUtility faster and much more scaleable. 08/22508/3
authorKasper Ligaard <kasperligaard@gmail.com>
Mon, 22 Jul 2013 16:19:49 +0000 (18:19 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 23 Jul 2013 09:29:04 +0000 (11:29 +0200)
commit8ca3486fe1525753f2619594c3406ede2dacf381
tree1d3357f1499eff1323de6de3ccc3a334250cd960
parent2a8ee1dc2c9f708e9c5150a812313628e0f179f7
[TASK] Make DiffUtility faster and much more scaleable.

The method DiffUtility->explodeStringIntoWords() calls array_merge()
inside a loop. The cost of constantly doing a function invocation and
merging arrays needlessly slows the method and the whole diff utility.
Moving the array merging outside the loop, the method becomes faster
and able to handle much larger input.

Change-Id: I4c2d21cff9b18392e89e316fec9dc615e715a073
Resolves: #50318
Releases: 6.2, 6.1, 6.0
Reviewed-on: https://review.typo3.org/22508
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/core/Classes/Utility/DiffUtility.php