Ruby on Rails Caching Benchmarks

Posted by Max Dunn Wed, 13 Sep 2006 00:56:53 GMT | no comments

I have been working on optimizing my Ruby on Rails wiki so that it can stand up under heavy load. The first step I took was to implement caching so that the pages don’t need to be re-rendered each time. This is especially important in my wiki since each page can have 6 different sections that need to be rendered:

  1. header
  2. menu
  3. footer
  4. left column
  5. middle column
  6. right column.

I did some quick benchmarks that might be useful for others that are optimizing their RoR apps:

Caching Method   Page Load Time   Pages per Second
None 620ms 1.6
Action 270ms 3.7
Page 18ms 55

These times were produced with the web load testing program The Grinder on my Averatec AMD 2800+ laptop using WEBrick running Windows XP and Rails in development mode.

The main conclusion is that while utilizing Action caching doubled the performance, using Page caching increased the performance over 30 times!

Posted in

Getting Started With Flickr on Rails

Posted by Max Dunn Thu, 06 Jul 2006 17:47:03 GMT | 4 comments

I have been working on a Flickr mashup on my wiki so that I can easily insert links to my Flickr pictures. There are several Flickr libraries for Rails, but the documentation is not very good. So here are some instructions for getting a Flickr library working with Rails.

(Note: On August 28, 2006, I expanded and updated these instructions at: http://www.maxdunn.com/RoR+and+Flickr)

Read more...

Posted in ,

Google Map Mashup in Rails

Posted by Max Dunn Fri, 30 Jun 2006 17:03:00 GMT | no comments

How would you like to put an interactive Google map in your Ruby on Rails page with single or multiple markers? Here is how to do this.

Read more...

Posted in ,

Ruby on Rails

Posted by Max Dunn Sat, 03 Dec 2005 19:32:00 GMT | no comments

I have been working on a web site for my son’s baseball club, Tri-Cities Baseball, with my wife Suzanne and our friend Steve Cousins, and it has been a lot of fun.

Suzanne has been doing the graphical design and static pages, and Steve and I have been working on the registration part using Ruby on Rails (RoR).

RoR is a fantastic environment that makes it easy to develop, deploy and maintain web applications, particularly for doing data-base backed web sites.

Ruby by itself is a great object oriented language, that provides all the benefits of object orientation, without the downfalls of pure(object(languages(like(lisp)))). (That was a Lisp joke. ;-)

Rails is a framework that uses a Model-View-Controller (MVC) architecture and a Don’t Repeat Yourself (DRY) philosophy so your code is cleaner and easier to maintain. It also includes a object-relation mapping so that it is easy to store and retrieve stuff without having to write a bunch of low level SQL. It also handles sessions and uses a lot of conventions over configuration, which lets you get down to work rather than spending a lot of time setting stuff up.

It is always hard to learn a new language AND a new framework, but it is amazing how much we were able to accomplish in a short time starting at zero.

Another indication of how easy it is to develop applications in RoR is that even though it has only been around for about a year and a half, there are already an incredible amount of applications available using it, including blogs, wikis, bug tracking, project tracking, accounting, forums, picture galleries, and more. For comparison, Java has been around for over 10 years, and it still doesn’t have some of the applications available in RoR!

Posted in

Older posts: 1 2