- 25 11月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
Thanks to @thedarkone for pointing out that an instance of this object is used in a shared context.
-
- 24 11月, 2014 1 次提交
-
-
由 Yves Senn 提交于
-
- 23 11月, 2014 3 次提交
-
-
由 Arthur Neves 提交于
-
由 Sean Griffin 提交于
For some reason changing `.find` to `.unscoped.find` in https://github.com/rails/rails/commit/f766abd4cf3eb75469d3646cfb6d85e668c619f3 caused `scoping` to leak in some tests when run in isolation (looks like a concurrency issue?). `relation_scoping_test.rb` is a case that failed. From what I can tell it should not be possible, but changing to the block form fixes it. There is a deeper issue that I can't seem to find. /cc @senny
-
由 Sean Griffin 提交于
Also checked to make sure this does not affect foreign key constraints. (It doesn't). Fixes #12856 Closes #14088
-
- 22 11月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
We can't change the signature without a deprecation cycle.
-
- 21 11月, 2014 4 次提交
-
-
由 siddharth@vinsol.com 提交于
on the joined assoiciation
-
由 Yves Senn 提交于
Prior to this patch you'd end up with an error like: ``` ActiveRecord::RecordNotFound: Couldn't find <Model> with 'id'=<id> [WHERE (<default_scope condition>)] ```
-
由 Aaron Patterson 提交于
-
由 claudiob 提交于
I grepped the source code for code snippets wrapped in backticks in the comments and replaced the backticks with plus signs so they are correctly displayed in the Rails documentation. [ci skip]
-
- 20 11月, 2014 5 次提交
-
-
由 Yves Senn 提交于
This makes the following changes: * warn if `:null` is not passed to `add_timestamps` * `timestamps` method docs link to `add_timestamps` docs * explain where additional options go * adjust examples to include `null: false` (to prevent deprecation warnings)
-
由 Sam 提交于
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
It doesn't make sense for the subclass to implement this method, and not have it on the parent. We can also DRY up the implementation of `#lookup` to be defined in terms of fetch, which will give us a single point of entry
-
由 Sean Griffin 提交于
This reverts commit da99a2a2.
-
- 19 11月, 2014 7 次提交
-
-
由 dtaniwaki 提交于
-
由 Sean Griffin 提交于
We added a comparison to "id", and call to `self.class.primary_key` a *lot*. We also have performance hits from `&block` all over the place. We skip the check in a new method, in order to avoid breaking the behavior of `read_attribute`
-
由 Aaron Patterson 提交于
-
由 Sean Griffin 提交于
We don't have the check the range when the value is coming from the DB, so override type_cast_from_database to short-circuit the extra work. The difference is huge but the absolute gain is quite small. That being said this is a hotspot and it showed up on the radar when benchmarking discourse.
-
由 Sean Griffin 提交于
This appears to be a performance hotspot, see #17655.
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
Performance improvement, as well as improved code clarity
-
- 18 11月, 2014 6 次提交
-
-
由 Sam 提交于
-
由 Godfrey Chan 提交于
This reverts commit 6f7910ae and 52c70d49. Query params are type cased through the same method, so this approach doesn't work.
-
由 Godfrey Chan 提交于
See comment on 6f7910ae
-
由 Godfrey Chan 提交于
We don't have the check the range when the value is coming from the DB, so override type_cast_from_database to short-circuit the extra work. type_cast_from_database (small) 3437507.5 (±29.2%) i/s - 14223135 in 4.996973s type_cast_from_database (large) 3158588.7 (±28.3%) i/s - 13265628 in 4.992121s type_cast (small) 481984.8 (±14.2%) i/s - 2352012 in 5.005694s type_cast (large) 477331.8 (±14.2%) i/s - 2332824 in 5.012365s Comparison: type_cast_from_database (small): 3437507.5 i/s type_cast_from_database (large): 3158588.7 i/s - 1.09x slower type_cast (small): 481984.8 i/s - 7.13x slower type_cast (large): 477331.8 i/s - 7.20x slower The difference is huge but the absolute gain is quite small. That being said this is a hotspot and it showed up on the radar when benchmarking discourse.
-
由 Sean Griffin 提交于
Oh hey, we got to remove some code because of that!
-
由 Sean Griffin 提交于
Arel handles this for us automatically. Updated tests, as BindParam is no longer a subclass of SqlLiteral. We should remove the second argument to substitute_at entirely, as it's no longer used
-
- 17 11月, 2014 3 次提交
-
-
由 Sean Griffin 提交于
This caused a pretty major performance regression for 4.2, as this is a hotspot for query construction. We're still slightly slower than 4.1, but it's much less significant.
-
由 Sean Griffin 提交于
This class no longer has any private methods
-
由 Sam 提交于
-
- 15 11月, 2014 5 次提交
-
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
`default_proc` makes a hash unmarshallable, and adds unneccessary overhead. Since we control all access to the hash, let's just handle it in that method. This has the side effect of improving performance on initialization (but not neccessarily on access). We'll need to profile further once the tests are passing.
-
由 Sean Griffin 提交于
In real usage, we give the builder a types hash with a default value of `Type::Value.new`. This means we need to explicitly check for the key, rather than the truthiness of the type to determine if it's a known but uninitialized attribute
-
由 Sean Griffin 提交于
We don't know which attributes will or won't be used, and we don't want to create massive bottlenecks at instantiation. Rather than doing *any* iteration over types and values, we can lazily instantiate the object. The lazy attribute hash should not fully implement hash, or subclass hash at any point in the future. It is not meant to be a replacement, but instead implement its own interface which happens to overlap.
-
由 Sean Griffin 提交于
This reverts commit 8fee9238. Conflicts: activerecord/lib/active_record/attribute_set/builder.rb This solution sucks, and is hard to actually apply across the board. Going to try other solutions
-
- 14 11月, 2014 2 次提交
-
-
由 Sean Griffin 提交于
There is a significant performance difference between the two. Closes
-
由 Aaron Patterson 提交于
also increase the version of pg required so that people will get the GVL friendly version
-
- 13 11月, 2014 1 次提交
-
-
由 shiksha 提交于
-
- 12 11月, 2014 1 次提交
-
-
由 Andrey Deryabin 提交于
-