[Nitro] Idea for improving performance
reid.thompson at ateb.com
Fri Nov 18 08:23:48 EST 2005
George Moschovitis wrote:
> Well, I was thinking about something like this for a long time. I am
> not sure this is the right thing to add, any other opinions? In any
> case, a patch would help here ;-)
> On 11/16/05, Rob Pitt <rob at motionpath.com> wrote:
>>I think that Og should only write back to the database fields that have
>>changed. Every object could keep an array containing the state of each
>>field (modified, or not) and the setter methods could modify the array.
>>It could also be implemented by having the array store the modified
>>properties, pushing the properties into the array when they are
>>modified. You could then use eval to completely remove the logic that
>>does this from the setter method causing minimal overhead.
>>This is a feature I expect would improve performance noticably. This is
>>just two ideas on how it could be done... what do you think?
>>Nitro-general mailing list
>>Nitro-general at rubyforge.org
> Nitro-general mailing list
> Nitro-general at rubyforge.org
not sure whether it would make any difference for PostgreSQL -- If I
understand correctly, an update means a delete and insert regardless of
the number of fields you are updating. Seems like the only gain would
be size of the sql statement i.e. not very much.
More information about the Nitro-general