Tag performance
13 votes
4 comments
4803 views
Use asset_host for production server
Use asset host for cookie-free domains for components, that make your components load faster.
8 votes
2 comments
5053 views
Using css sprite can reduce a large number of http requests, so it makes the web page loaded much faster. It it painful to composite a lot of images manually, do it automatically.
8 votes
1 comments
5551 views
Do you experience that your website renders slow due to loading a lot of javascripts, especially loading some third-party javascripts? Move script tags to the bottom of body can speed up the render of your website.
8 votes
7 comments
4661 views
Use batched finder for large data query
If you want to do a large data query such as finding all the 10,000,000 users to send email to them, you should use batched finder to avoid eating too much memory.
4 votes
14 comments
5961 views
Select specific fields for performance
In a system like forum, the title and body is displayed on show page, but only title is on index page. You should use select in query to speed up the query and save memory.
27 votes
14 comments
13777 views
Memoization is an optimization technique used primarily to speed up computer programs by having function calls avoid repeating the calculation of results for previously-processed inputs. In rails, you can easily use memoize which is inherited from ActiveSupport::Memoizable.
5 votes
2 comments
8281 views
Active Record Query Interface Optimization
Use select with has_many and belongs_to on Active Record Associations
3 votes
4 comments
7567 views
rails migration provides a convenient way to alter database structure, you can easily add, change and drop column to a existing table, but when the data in existing table are huge, it will take a long time to alter existing table, you should try to merge/optimize the db alter sql statements.
