[TASK] Make DiffUtility faster and much more scaleable. 10/22510/2
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:50 +0000 (11:29 +0200)
commit26ef7438c0e198254f2217097dd817ad8c438672
tree55483d7b82e9eedae555eac05589911673c0e995
parent7f42eca5563f16f7fc408d1bfa45eb532d109cef
[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/22510
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/core/Classes/Utility/DiffUtility.php