Speeding up Drupal 5.x on Dreamhost, slow no more!

I'm sure you all love Drupal however there are a couple of design decisions that are less than ideal in all circumstances.


One of them is the path alias handling, you know - the stuff that lets you have a page accessible via mysite.com/fruit/bananas instead of mysite.com/node/1234


If you run a Drupal instance, where your mysql server is not on the same machine as your Drupal code, then you should read below.. that mean's you dreamhost people, and could help to alleviate some issues with Drupal being slow on dreamhost.


See, there are two things the pathalias module performs that makes all this happen, and subsequently adds possibly hundreds of extra mysql calls.


One - when you load a page like mysite.com/fruit/bananas Drupal must check the DB to find the real path for this, such as /node/1234 this is done with a single mysql lookup.


Two - when that page loads, it may contain 10 links in the content and a bunch of blocks around it like tag cloud, comments, etc, for each link, generally Drupal will also try to find if it should present a real world path like fruit/apples instead of node/1235


Now, *performing* a MySQL call is very slow, there are a LOT of overheads involved with making the actual call, this is where we attack Drupal's slowness on Dreamhost.


To prove my point about Drupal slowlness on Dreamhost, we'll use one of my favourite sites metal tshirt gallery


With my patch the

have fun!

AttachmentSize
cache-test-php.txt1017 bytes
pathfullcache.patch.txt2.45 KB
4.857145
Your rating: None Average: 4.9 (7 votes)