Advanced Rails - Building Industrial-Strength Web Apps in Record Time
ActiveRecord Performance | 165 ActiveRecord Performance Object-relational mapping systems provide such a high-level environment ...
166 | Chapter 6: Performance The problem withfind_by_sqlis that it instantiates every object that is returned. This is usually f ...
ActiveRecord Performance | 167 Invoking theusermethod on eachPersonobject will force a separate load from the database. If the p ...
168 | Chapter 6: Performance There is really no substitute for understanding what queries are being sent to the database and how ...
ActiveRecord Performance | 169 One complication in indexing decisions is that certain DBMSs (MySQL 4 and ear- lier, and PostgreS ...
170 | Chapter 6: Performance Jens Krämer’s acts_as_ferret library (http://projects.jkraemer.net/acts_as_ferret/) makes it quite ...
ActiveRecord Performance | 171 Updating index statistics The query planner maintains statistics on each index to decide which on ...
172 | Chapter 6: Performance listings_development=> EXPLAIN SELECT min(listing_id) as listing_id, count(listing_id) as cluste ...
Architectural Scalability | 173 We can see from this example that there are already sufficient indexes on the table, and they ar ...
174 | Chapter 6: Performance Nevertheless, there are a few other concerns that you should be aware of when scal- ing a Rails app ...
Architectural Scalability | 175 ActiveRecord, or if you are tuning performance and ActiveRecord’s advanced fea- tures are too he ...
176 | Chapter 6: Performance db_memcache_store, which uses memcached as a cache on top of database sessions, so sessions will no ...
Architectural Scalability | 177 Page caching Page cachingis conceptually the simplest form of response caching, and it is also t ...
178 | Chapter 6: Performance Action caching is triggered by thecaches_actionmethod. Here’s an example that only allows a page to ...
Architectural Scalability | 179 In this example, we assume that the barcode for a particular piece of text never changes, so we ...
180 | Chapter 6: Performance There is a Rails helper for caching part of a page. This helper, calledcache, abstracts away the de ...
Other Systems | 181 class PersonSweeper < ActionController::Caching::Sweeper observe Person def after_save(record) expire_cac ...
182 | Chapter 6: Performance Choosing the Right Tool A large part of software development consists of selecting the right tools ...
Other Systems | 183 def factorial(n) result = 1 n.downto(2) { |x| result *= x } result end # Reimplemented in C (compiled on the ...
184 | Chapter 6: Performance One common problem is that email delivery via SMT Pis quite slow, on the average. In addition, it i ...
«
5
6
7
8
9
10
11
12
13
14
»
Free download pdf