RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: Performance x
Model Caching (revised)
Episode #115 – May 13, 2013 – 426 comments

Model Caching (revised)

Caching at a low level is a great option when the view is too dynamic to cache and you need something flexible that can work anywhere in the application. Here I show a variety of ways to use Rails.cache with Active Record. (12 minutes)
Fast Tests
Episode #413 – Apr 10, 2013 – 200 comments

Fast Tests

A slow test suite can put a damper on test-driven development. In this episode I show a variety of ways to optimize specs including: selective testing, preloading Rails, and testing outside of Rails. (17 minutes)
Performance Testing
Episode #411 – Mar 27, 2013 – 219 comments

Performance Testing

Learn how to add performance tests that automate benchmark and profile reports. Here I show how to find the bottlenecks to optimize a page. I also show how to compile Ruby with gcdata to get information about memory usage. (16 minutes)
Eager Loading (revised)
Episode #22 – Mar 20, 2013 – 223 comments

Eager Loading (revised)

One way to improve performance is to reduce the number of database queries through eager loading. Here I demonstrate this and compare the difference between the "includes" and "joins" methods. (7 minutes)
Polling for Changes (revised)
Episode #229 – Jan 14, 2013 – 92 comments

Polling for Changes (revised)

Polling may not be as common today as pushing changes over an open socket, however it is still an effective, simple solution if you do not need instantaneous updates. (10 minutes)
Autocomplete Search Terms
Episode #399 – Dec 31, 2012 – 90 comments

Autocomplete Search Terms

Learn how to add autocompletion to a search form and improve performance using Rack middleware, caching and switching from SQL to Redis. (17 minutes)
Turbolinks
Episode #390 – Nov 05, 2012 – 114 comments

Turbolinks

Turbolinks can make your Rails app feel faster by using JavaScript to replace the page content when clicking a link. It will be default in new Rails 4.0 applications, but here I show how to use it in Rails 3 and mention some of the gotchas. (7 minutes)
Cache Digests
Episode #387 – Oct 20, 2012 – 91 comments

Cache Digests

The cache_digests gem (also included in Rails 4) will automatically add a digest to the fragment cache key based on the template. If a template changes the cache will auto-expire. But watch out for the gotchas! (7 minutes)
Charts & Graphs (revised)
Episode #223 – Sep 15, 2012 – 116 comments

Charts & Graphs (revised)

If you have a lot of data, consider adding a graph to provide an overview of it. Here I show how to use Morris.js to chart an Order model and visualize trends in the data. (12 minutes)
Memcached & Dalli
Episode #380 – Sep 12, 2012 – 83 comments

Memcached & Dalli

Memcached is an excellent cache store, and Dalli is the best way to interact with it through Ruby. Here I show various ways to use Memcached in a Rails app including how to set it up in production. (12 minutes)