cakephp/cakephp — pull request #4187 by markstory (2014-08-07 14:49:52+00:00)
Title: Optimize StringTemplate a bit

@lorenzo did a profile run recently and found that StringTemplate was one of the heavier aspects of the page. It was spending a good amount of time compiling and formatting results. I tried to fix the compiling by adding a persistent cache, but that resulted in *slower* response times as reading from the file cache was not cheap.

I ended up removing attribute formatting templates, and eagerly compiling all templates. This saves a few hundred function calls (~2.5ms) per request which helps a bit.

![profiler](http://cl.ly/image/1H1u1O35073R/Screen%20Shot%202014-08-06%20at%2011.36.21%20PM.png)