Yireo migration (3): Performance
Saturday, 11 December 2010Our new Yireo site was setup with various goals in mind: It had to pay more attention to those parts that were important: For instance, MageBridge is not simply a single extension, it has actually introduced a vast technology that needs plenty of guidance and information. But other goals included security, SEO and performance. So let's take a look what we did to improve the performance.
Server-side performance
On the server-side we have applied various tricks to make both Joomla! as Magento lean and mean. The MySQL server is tuned to allow for optimized query caching. The tmp-folders and session-folders for both Joomla! as Magento are placed within a memory-based filesystem (tmpfs). Caching is enabled where possible: Joomla! caching, Magento caching but also the new MageBridge caching is enabled.
Within Magento we also applied a few more tricks: The Magento Compiler is used to reduce the 4 normal include-paths to just 1. We have also added GoogleGears extensions to make sure backend access in Magento and Joomla! requires little extra bandwidth.
Less bandwidth, more speed
A fast site requires less bandwidth, so one of our goals was also to reduce the total size of the site. First of all, the amount of images is reduced and the CSS-code has been written from scratch to generate the least overhead. To reduce the number of HTTP Requests, images are combined into a single large image using CSS Sprite, while various CSS stylesheets are combined together using our Yireo ScriptMerge plugin.
Still, Magento is one of the main bandwidth consumers: The Magento theme uses ProtoType and Scriptaculous, and all scripts easily add up to 300Kb per page. MageBridge includes a new (experimental) feature to replace ProtoType and Scriptaculous with a combined library called Protoaculous. This saves 60Kb - which does not seem much, but it certainly adds up.
More to come
Things could be speed up even more: At the moment, the Yireo site is hosted on a shared hosting environment. The tmpfs-tricks mentioned earlier are applied because they require little extra memory (100Mb in total for the Yireo site) and because we are god on that server. However, the numbers of visitors are slowly rising and because of this, we are also looking at moving to a dedicated server.
A dedicated server allows for further optimization. Most likely this server will replace Apache with Nginx to allow for even more performance. We have already finished testing Joomla!, Magento and MageBridge on Nginx (a tutorial will be released as well) and this works great - and it certainly seems faster.
