On Jul 28, 2006, at 2:04 PM, Marcel Molina Jr. wrote:
On Fri, Jul 28, 2006 at 01:07:59PM -0700, Bob Silva wrote:
I'm curious to know if "dirty" checking was considered during the
design
process of AR. It would add performance benefits (configurable?)
for larger
tables and associations in a write heavy environment especially if
you have
text or blob fields in your tables. Anyone care to PDI this as a
plugin?
As I remember it, about a year ago Jeremy Kemper implemented dirty
column
tracking and decided against it for reasons I forget. Something
wasn't right
in the cosmos though.
If I am remembering correctly, maybe he could share what the issues
were
before someone dives into implementing a plugin for this.
Performance hurt. Having write_attribute mark dirty[attr] = true
would be great, but attributes may be modified in-place once they're
read, so we have to hash or copy them and look for changes.
A seductive alternative to is to treat attribute values as immutable
- freeze the value returned from read_attribute. Then we're on easy
street.
jeremy
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core