Shop Talk‎ > ‎

Sub second response time

posted Oct 7, 2008 8:18 PM by Travell Perkins   [ updated Oct 8, 2008 10:16 AM ]

So I have been implementing a couple of performance improvements across the codebase.  RGB Daily is written in PHP, CSS/XHTML, and Javascript.  I was able to speed up the performance on the client side by integrating Minify to serve us the CSS and Javascript.  Processing on the server side was still taking around 2-3 seconds on average.  It turns out that the bottleneck was the templating engine.  There was a long standing bug which cleared previously loaded config constants when a new config file was appended. Consequently the main config file that was used in the application was reloaded after every sub module that makes up the page.

I refactored the code so that it only loads a single config file once per template instantiation.  I will go further and cache the parsed config files to get even more speed gains.  Localized files will only cost as much as a simple include.

Originally posted July 28, 2008