diff options
author | Arthur Neves <arthurnn@gmail.com> | 2015-03-02 11:02:02 -0500 |
---|---|---|
committer | Arthur Neves <arthurnn@gmail.com> | 2015-03-02 11:02:02 -0500 |
commit | a45015d0c81a39a848b3fe7dc13920c89a27a2f4 (patch) | |
tree | ed7f178240ba35de257ff240a5214fafd629ce5a /activerecord/test/fixtures/vegetables.yml | |
parent | f9ed46bf5071545cce629cc6164029906cb2eb36 (diff) | |
download | rails-a45015d0c81a39a848b3fe7dc13920c89a27a2f4.tar.gz rails-a45015d0c81a39a848b3fe7dc13920c89a27a2f4.tar.bz2 rails-a45015d0c81a39a848b3fe7dc13920c89a27a2f4.zip |
Remove !has_transactional_callbacks? check
We only set the state on the record if that condition is `false` in the
first place, so we dont need to call that again. Also that call is
expensive, follow benchmark with before and after this change:
```
Calculating -------------------------------------
persisted? 15.272k i/100ms
-------------------------------------------------
persisted? 350.119k (± 4.6%) i/s - 1.756M
```
```
Calculating -------------------------------------
persisted? 25.988k i/100ms
-------------------------------------------------
persisted? 1.294M (± 5.3%) i/s - 6.445M
```
(benchmark borrowed from 57d35b2bf9e48173a5f97ccff5e6897f0c46411f)
Diffstat (limited to 'activerecord/test/fixtures/vegetables.yml')
0 files changed, 0 insertions, 0 deletions