Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Applied Filters: Performance x
Model Caching (revised)
Episode #115May 13, 201333 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 #413Apr 10, 201332 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 #411Mar 27, 201321 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 #22Mar 20, 201321 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 #229Jan 14, 201320 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 #399Dec 31, 201220 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 #390Nov 05, 201238 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 #387Oct 20, 201233 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 #223Sep 15, 201258 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 #380Sep 12, 201217 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)