Yireo tutorials

Learn more about Joomla!TM and Magento
You are here: Home Tutorials MageBridge MageBridge administration Performance tuning with MageBridge

Performance tuning with MageBridge

MageBridge makes it much easier to build a Joomla!TM-based e-commerce website, but with any good website performance is an important issue. This article tells you more about the performance issues of MageBridgeTM and what you can do to improve the performance.

In short

  • Place Joomla! and MagentoTM on the same webserver (any server)
  • Enable Magento caching (any server)
  • Enable mod_deflate for both Joomla! as Magento (any server)
  • Disable unused Magento modules (any server)
  • Disable unused Joomla! extensions (any server)
  • Use the right memory_limit in .htaccess (any server)
  • Enable APC in Magento app/etc/local.xml (any server)
  • Merge CSS and JavaScript files (any server)
  • Add Magento hostname to /etc/hosts (dedicated server)
  • Enable KeepAlives in Apache (dedicated server)
  • Move Magento var/cache into tmpfs (dedicated server)

Optimizing HTTP and DNS

MageBridge integrates Magento within Joomla! by using a remote API. This allows for a clean solution without hacks in the code or hacks through the database, and also allows for more advanced configurations like webclusters and multiple Joomla! sites per Magento store. However, using this remote API involves extra HTTP-communication on each request being made, which takes more time and is bad for performance.

Optimizing HTTP is still another option: While you most certainly will not benefit that much by optimizing TCP-windows or datagram-sizes, one thing to pay attention to is DNS: It's best to add the Magento hostname to the /etc/hosts-file on the Joomla! server. This allows DNS to be skipped when MageBridge contacts Magento.

Same webserver

Putting Magento and Joomla! on the same webserver will improve this a bit, because each HTTP-request only has to travel through the internal interfaces of the webserver and not over the Internet.

Use Magento caching

In general, caching is good. Magento is a complex application using a mix of XML and PHP to allow for very flexible configurations. But this complexity slows things down as well. That's why caching is a very smart thing to do. Within Magento Cache Management you can enable various types of cachable systems, and if things are cached on the Magento side, it means those things are fetched faster over the bridge.

Enable compression of webcontent

It is recommended to enable GZIP compression on both the webserver (Apache) as well as PHP. If both applications are configured to offer compression, the page might get compressed twice, but modern browsers do not reject this.

Within Apache the most common way to enable compression is by installing mod_gzip for Apache 1.x or mod_deflate for Apache 2.x. Within PHP you could turn on "zlib.output_compression", but in general this is not recommended because other applications on the same webserver might object. Just make sure you have the zlib-extension compiled into PHP.

Disable unneeded Magento modules

Because MageBridge is depending on Magento, it should be clear that optimizing Magento also benefits the bridge. Disable all the modules you don't need (System > Configuration > Advanced > Advanced > Disable Modules Output). Of course, only modify this after you have made a proper backup.

Enable APC

Make sure your PHP-environment supports APC (Advanced PHP Caching) because this will speed up things a lot.

Place var/cache in memory

Memory is faster than disk. Moving the var/cache directory to a filesystem of tmpfs (memory-based) increases performance.

Merge CSS and JavaScript in Magento

An average Magento site adds a lot of different CSS-files and JavaScript-files to the page, for which the browser needs to make extra HTTP-requests. Magento offers functionality to combine all CSS and JavaScript files into one single HTTP-request, saving bandwidth.

Use memory_limit for Magento

Increase the memory limit for PHP-scripts by editing your .htaccess file:

php_value memory_limit 256M

Enable caching in Joomla!

As with Magento, Joomla! can also be optimized. Enable caching will make each page load faster. This counts for regular Joomla! articles as well as Magento product-pages. Be warned that page-caching is currently impossible and that extensions that depend on the user-state should never be cached. As caching mechanism you can configure either files or APC (recommended).

Disable unneeded Joomla! extensions

Disable all the components, modules and plugins that you don't need. Modules and plugins can be unpublished, but components can be disabled as well - navigate to the Installation Manager and then the Components-tab.

Use memory_limit for Joomla!

Increase the memory limit for PHP-scripts by editing your .htaccess file:

php_value memory_limit 64M

Merge CSS and JavaScript in Joomla!

A Joomla! site might include many different CSS-files and JavaScript-files, for which the browser needs to make extra HTTP-requests. Use the YireoTM ScriptMerge plugin to bundle JS and CSS for extra performance.

Tutorials on MageBridge administration

Tutorials on MageBridge integrations

 

Payments Methods

Payment Methods