[CDBI] Re: construct sucks.
perrin at elem.com
Sun Aug 27 20:32:05 BST 2006
Ryan Tate wrote:
> PS in 0.96, Class::DBI::_init contains the comment "# don't store it
> unless all keys are present" just before the section where the object
> is added to LiveObject index, but this appears to not be implemented!
> Or perhaps it was implemented and later reconsidered.
Maybe you are misunderstanding what "keys" refers to. That means all
members of the primary key, not all values.
And yes, the object index hurts performance. It is not a performance
feature. It's only purpose is to make sure you don't load two of the
same object into one process' memory at once, which some users found
strange and unintuitive. Ultimately, the scoping problems seem to
outweigh the benefits, so I turn it off in my code now.
More information about the ClassDBI