Avoid expensive array_shift where possible
authorThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Mon, 17 Dec 2018 10:58:55 +0000 (11:58 +0100)
committerThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Mon, 17 Dec 2018 10:58:55 +0000 (11:58 +0100)
commitfa7e5bd90199576bb7bce9b57569d3382f0a9993
treee4427e61e6396c8bd5d41958e884ba4594ca19eb
parentd7fba6c62decdcbd108cdd26b49a9075377e6368
Avoid expensive array_shift where possible

array_shift manipulates the original array. This is surprisingly
expensive, because it iterates *all* elements in the array and
decrements numeric keys. The code touched in this patch does not need
this restructured new array, but only the individual elements.

Change-Id: Iee28377b2c9930f6de821e041381a1d7564f7633
includes/Title.php
includes/cache/CacheHelper.php
includes/htmlform/HTMLForm.php
includes/htmlform/HTMLFormField.php