Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Small tweak to fix unnecessary duping and loading

#3678

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?

Reported by Will Bryant · January 10th, 2010 @ 12:15 AM

State: stale
Milestone: 2.3.10
Assigned to: Pratik Pratik
Importance: Low

Activity

  1. Will Bryant
    Will Bryant
    • Assigned user cleared.

    Attached rebased patch against master, as the same improvement still applies to 3.0.

    May 26th, 2010 @ 05:01 AM

  2. Jeremy Kemper
    Jeremy Kemper
    • Milestone set to 2.3.9
    • State changed from new to open
    • Assigned user set to Pratik

    May 26th, 2010 @ 04:59 PM

  3. Jeremy Kemper
    Jeremy Kemper
    • Milestone changed from 2.3.9 to 2.3.10
    • Importance changed from to Low

    August 30th, 2010 @ 02:28 AM

  4. Santiago Pastorino
    Santiago Pastorino

    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.

    February 2nd, 2011 @ 04:49 PM

  5. Santiago Pastorino
    Santiago Pastorino
    • State changed from open to stale

    February 2nd, 2011 @ 04:49 PM