Optimizing Joomla Sites for Speed
December 5, 2007
As I have blogged before, I have the dubious honour to work as a web application developer/Linux administrator/general IT “Mr fix-it-all” guy at a Joomla based shop. (hey it pays the bills and it’s not like I will be here for long
). This is essentially a mom-and-pop store with a tight budget so one has to cut corners. In that light, the decision was to buy a linux VPS (Virtual Private Server, for the uninitiated). As my projects are not connected with the Joomla development team, I have left them happily turning one cookie-cutter page after another. Like many other techies, I am a content-over-style person so I felt that the graphics ladden pages were at least atrocious. But hey! its the customer’s wish so they get their money’s worth in .swf animations, animated .pngs, the works.
It came of little surprise when the pages viewed not in our Gigabit LAN but over a run-of-the-mill DSL line where slooooooooooooooooow. Guess who comes to the rescue. Since it is only logical that many other shops fail to hire web monkeys that adhere to web development best practices, I decided to share my experiences in trying to solve the problem (ok, I use the verb solve more in a “band-aid applied over multiple 7.62mm wounds” but I am sure you knew that already).
- When using CSS and Javascript, try to keep them in external files as much as possible (always for you and me). This way, they get cached and you save some precious user experience time by using that.
- PNGcrush is your friend. I cannot stress this enough. Even if you get only a 10% reduction in filesize for each .PNG, they quickly add up. Speaking from experience, I got reduction between 5% and 25% in each file, which was well worth it.
- Since you are using a database to store your content, turn RAM caching on (if you can afford it). While memory hungry (total memory consumption of our server is 280Mb), it gives a tremendous boost. MySQL documentation has an excellent section on how to do this and some consideration/poor man’s benchmarks. I can assume that your database has something relevant (between you and me, while MySQL gets the job done and has tons of support, it certainly is not the pinnacle of technological achievement in the open source database field).
- If you are using Joomla (or Mambo or a similar CMS), try to keep the number of modules to a bare minimum. Each module, even if it is lightweight in actual size, is at least one HTTP request so that bogs the performance down.
So, if you have to face the all-too-common “clueless management with incompetent web designer” syndrome and teaching (enforcing should be a more appropriate term) web design best practices is out of the question, the (kinda obvious, to be honest) tips above might squeeze an ounce of performance or two that can make a difference.
Joomla Woes (Yet another quick post) OR Consider me a Drupal Fanboi
October 23, 2007
A while ago a friend of my commented in a conversation (and sparked a blog post) about how Joomla is evil and corrupts the souls of teenagers with an “easy money” mentality. From a not-so-short debugging session at work (having to look after the work of two unexperienced guys plus a manager turned “coder” to save some $$$) I reach this conclusion.
Joomla sucks.
Yeap, you read it correctly, and yes I take my chanced making such a harsh statement.
Why it sucks?
As with any click and go technology it is really easy to screw yourself. In the surface all is well, templates, modules, components the works. In the backend? Not so good. If you have to extend it, prepare to break every major software engineering rule and write UGLY code (granted, PHP code tends to be ugly). If you have to debug it, it is a bitch. Having worked briefly with Drupal (in an ugly personal LAN website
) and Joomla, I believe that Drupal is the best of them two.
Using it as as simple (and I mean really simple) CMS, it is Ok. Trying to hack it to perform tasks not inherently suited to it sucks. Compared with Drupal which is hook based, it really really sucks… Combine Joomla with incompetent management (i.e. hammer, world, nail) and you have a work hour sucker.
(sorry, I try to keep lixtetrax rant free but after the last workweek, I really had to let this out of my chest).
Web Application Frameworks to keep an eye on in the future
October 2, 2007
If you are doing small to medium scale web application development (btw, I do not want to imply that the frameworks here are unsuitable for large projects, but since I have no personal experience using them in a large project, I will not add a hearsay opinion) you really should keep an eye on these:
Which one of them will survive (since there is a ton of Java frameworks, many claim that Ruby is a fad and two frameworks for python?) will depend on many factors, not all relevant with technical excellence or ease of use.
I have the honour to work with #2 to make ends meet and #3 for personal projects. I like them both but the common thing is that innovation is shared (i.e. they have many things in common
) . DRY anyone?
Ruby On Rails
August 29, 2007
Undisclosed Ruby On Rails project:
So far so good…
Or better
so far so good so rocking
MVC, MVC, MVC
One of the most abused compound design patterns with many heinous crimes committed to its name. I will not compare RoR vs your_favorite_web_app_technology here, I am not a master of everything and I am pretty new to this RoR game so…
Strict and efficient separation between the eM-Vee-Cee. Good thing.
A ton of work is taken care by the framework. I had it connecting to 2 different databases in no time (I am assuming that the default stuff is sane, as I did not had the time to to investigate it).
Syntax: like a one night stand with a so and so girl, a bit ugly but fast.
I will be investigating security aspects of it a bit later.