- 05 12月, 2011 1 次提交
-
-
由 Xavier Noria 提交于
This commit vastly reduces the impact of auto explain logging when enabled, while keeping a negligible cost when disabled. The first implementation was based on the idea of subscribing to "sql.active_record" when needed, and unsubscribing once done. This is the idea behind AR::Relation#explain. Subscribe, collect, unsubscribe. But with the current implementation of notifications unsubscribing is costly, because it wipes an internal cache and that puts a penalty on the next event. So we are switching to an approach where a long-running subscriber is listening. Instead of collecting the queries with a closure in a dedicated subscriber, now we setup a thread local. If the feature is disabled by setting the threshold to nil, the subscriber will call a method that does nothing. That's totally cheap.
-
- 04 12月, 2011 6 次提交
-
-
由 Xavier Noria 提交于
SQlite3 Bump
-
由 Arun Agrawal 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
We also need to time zone convert time zone aware attributes when accessed via read_attribute, not only when via direct access.
-
- 03 12月, 2011 20 次提交
-
-
由 Xavier Noria 提交于
Rationale: As discussed with José and Jon, this convenience shortcut is not clearly justified and it could let the user thing the disabled EXPLAINs are related to the model instance rather than being globally disabled.
-
由 Jon Leighton 提交于
reintroduce patch from #726 to handle nested eager loading via associations
-
由 Jon Leighton 提交于
Use show create table (fix 3678: third time).
-
由 José Valim 提交于
App Generator test
-
由 Arun Agrawal 提交于
-
由 José Valim 提交于
-
由 Jon Jensen 提交于
Revert html_escape to do a single gsub again, but add the "n" flag (no language, i.e. not multi-byte) to protect against XSS via invalid utf8 Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
由 Vijay Dev 提交于
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
由 Vijay Dev 提交于
-
由 Vijay Dev 提交于
-
由 Vijay Dev 提交于
-
由 Vijay Dev 提交于
-
由 Arun Agrawal 提交于
-
由 Xavier Noria 提交于
indentation fix warning
-
由 Arun Agrawal 提交于
-
由 kennyj 提交于
-
由 Xavier Noria 提交于
-
- 02 12月, 2011 13 次提交
-
-
由 Jon Leighton 提交于
This reverts commit f6b50463. Fear not, the roflscale will return when I have a bit more time and figure out a better way to do it. (In particular, a way that doesn't break the build.)
-
由 Xavier Noria 提交于
-
由 David Heinemeier Hansson 提交于
-
由 José Valim 提交于
-
由 Arun Agrawal 提交于
-
由 Arun Agrawal 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
Don't prefix the name with attribute_. Avoids a string allocation on read_attribute, which is a bit faster.
-
由 Jon Leighton 提交于
This means we never have to rely on define_method (which is slower and uses more memory), even when we have attributes containing characters that are not allowed in standard method names. (I am mainly changing this because the duplication annoys me, though.)
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
Also make it actually work. It slows down all read_attribute accesses to map 'id' to whatever the PK actually is, inside read_attribute. So instead make sure the necessary methods are defined and that they redirect wherever they need to go.
-
由 Jon Leighton 提交于
This is good because it reduces duplication.
-
由 Jon Leighton 提交于
-