This project is archived and is in readonly mode.
Small tweak to fix unnecessary duping and loading
Reported by Will Bryant | January 10th, 2010 @ 12:15 AM | in 2.3.10
Commit 8056c57 fixed #2397, but it introduces a little inefficiency to every non-dirty record save - it calls attributes rather than using @attributes, resulting in the entire attributes hash being duped on every save.
It also causes extra attribute loads if you're using a lazy-loading plugin such as http://github.com/willbryant/columns_on_demand, which is unnecessary - if the attributes aren't already loaded, they can't be dirty.
Attached tiny patch against 2-3-stable changes attributes to @attributes, tests are still happy.
This does apply cleanly to master also - but you need to cherry-pick 8056c57 first, it seems to have been left out so far (but should be applied as the same #2397 issue exists in master).
Sound OK?
Comments and changes to this ticket
-
Will Bryant May 26th, 2010 @ 05:01 AM
- Assigned user cleared.
Attached rebased patch against master, as the same improvement still applies to 3.0.
-
Jeremy Kemper May 26th, 2010 @ 04:59 PM
- Milestone set to 2.3.9
- State changed from new to open
- Assigned user set to Pratik
-
Jeremy Kemper August 30th, 2010 @ 02:28 AM
- Milestone changed from 2.3.9 to 2.3.10
- Importance changed from to Low
-
Santiago Pastorino February 2nd, 2011 @ 04:49 PM
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino February 2nd, 2011 @ 04:49 PM
- State changed from open to stale
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>