Re: possible improvement of Live_Objects cache

[prev] [thread] [next] [Date index for 2005/07/11]

From: Perrin Harkins
Subject: Re: possible improvement of Live_Objects cache
Date: 17:39 on 11 Jul 2005
On Mon, 2005-07-11 at 12:08 +0200, Jasper Cramwinckel wrote:
> Hm, does that mean I can not persuade you guys to look in %Live_Objects 
> during each retrieve() and skip the query when the object is available? ;-)

That is what it means.  If you want a cache, write a subclass for it.
It's very easy in the upcoming release.

> Note that with the current implementation, %Live_Objects van actually 
> cost extra queries because a retrieve with essential fields can be 
> ignored when in (empty) object is already in %Live_Objects.

Feel free to not keep empty objects lying around in memory...

> > I don't quite see how
> >this fits.  I get the gist though -- if the in-memory object only has
> >the primary keys defined, dump the existing data into it.  That's
> >probably safe.  Doing this in situations where there is more than just
> >the primary key would be questionable.
> >  
> >
> Why?

Because of the possibility of overwriting data that is being worked with
in memory.  We had discussed various possibilities, like checking for
changed fields or only storing loaded columns that are not in the in-
memory object.  Those might end up slowing things down too much to be
worth it.  If you'd like to try adding some checks to your patch to
avoid overwriting data and see how much they affect performance, that
would be cool.

- Perrin

possible improvement of Live_Objects cache
Jasper Cramwinckel 10:44 on 27 Jun 2005

Re: possible improvement of Live_Objects cache
Perrin Harkins 04:28 on 01 Jul 2005

Re: possible improvement of Live_Objects cache
Jasper Cramwinckel 10:08 on 11 Jul 2005

Re: possible improvement of Live_Objects cache
Perrin Harkins 17:39 on 11 Jul 2005

Generated at 16:35 on 28 Jul 2005 by mariachi v0.52