performance episodes
#1
Mar 05
23 comments
Caching with Instance Variables
Learn a quick way to improve performance. Just store the end result of an expensive command in an instance variable!
Eager Loading
One way to improve performance is to cut down on the number of SQL queries. You can do this through eager loading. Learn all about it in this episode!
Counter Cache Column
If you need to display the record count for a has_many association, you can improve performance by caching that number in a column.
Page Caching
Page caching is an efficient way to cache stateless content. In this episode I will show you how to cache the dynamic javascript we created last week.
Fragment Caching
Sometimes you only want to cache a section of a page instead of the entire page. Fragment caching is the answer as shown in this episode.
Action Caching
Action caching behaves much like page caching except it processes the controller filters. You can also make it conditional as seen in this episode.
Analyzing the Production Log
In order to improve performance of your Rails application you need to find the bottlenecks. A great starting point is your production log. In this episode you will see how to use RAWK to analyze your log file and determine which controller actions take up the most processing time.
Request Profiling
You can use profiling to determine where the performance bottlenecks are in specific Rails actions. Watch this episode for details.



