MDL-55650 Library: s() function - tweak parameters for performance
authorsam marshall <s.marshall@open.ac.uk>
Fri, 19 Aug 2016 13:32:51 +0000 (14:32 +0100)
committersam marshall <s.marshall@open.ac.uk>
Mon, 22 Aug 2016 14:38:13 +0000 (15:38 +0100)
commitb16b1f86b1d2a012655d529d7d2978a478ff3b23
treeb0270ff48880f6385d1a3fde3305a0eb44d9d948
parent3ca3cc77a27aa838a24a33eb461b8be3e5ba8fa3
MDL-55650 Library: s() function - tweak parameters for performance

The s() function includes a comment saying that parameter options
should be modified to improve performance once PHP 5.4 is required.
Since Moodle has required PHP 5.4 for some time, we should probably
make the change and remove the comment.

According to my benchmarking, these changes make s() about 7% faster
and will save a staggering 2ms from a typical course view that calls
it 8,000 times.
lib/tests/weblib_test.php
lib/weblib.php