The string implementation changed significantly between 7u5 and 7u6.
Substring now causes the contents to be copied, resulting in significant performance degradation.
This has already been reported as bug: 7197183