Category Archives: Miscellaneous

Wordpress with Nginx on Slicehost

Over the weekend I moved this blog from being hosted on my Dreamhost account to one of my 256mb Slicehost servers.
I’ve done this mainly to stop paying for hosting twice, but also because if I’m going to be talking about performance I can’t possibly have a slow blog and my options were limited with the [...]

Posted in Miscellaneous | Tagged , , | 3 Comments

I don’t use Foreign Key Constraints with Rails

A couple of months back we had Nigel talking at WellRailed about a Foreign Key Constraint plugin he uses with Rails and then just this week the topic was brought up again for me with a client.  I’ve found it’s something that pops up every now and again.  Given this is such a polarizing issue [...]

Also posted in Features | Tagged , , , , , , , , | 3 Comments

Be careful how you count in Rails

I’ve just encountered this problem yet again effecting code I’m working though, so I thought I’d quickly blog about it.
Put basically if you call count on a relationship it will always make a db call to see how many there are even if the relationship has been populated.  If you use size or any? they [...]

Also posted in Features | Tagged , , | 3 Comments

Performance optimisation through named_scope

I recently gave a presentation about using named_scopes to WellRailed and while it was still on my mind I thought that I’d cover named_scope in conjunction with some performance optimisation work I’ve been doing.
I used to use relationship extensions lots and it always irked me that I was putting business logic for a model, say [...]

Posted in Miscellaneous | Tagged , , , | Leave a comment
  •  

  • About Nahum Wild

    I'm a High Performance Website Consultant specialising in Ruby on Rails deployments. In this blog I cover common problems I've seen and provide insight on optimisation techniques.

  • Recommend Me

    Follow me on Twitter