I think his question is really about the speed of resolving faults. That
doesn't really change anything, however. If the object is cached, the
resolved fault will pull from cache. Otherwise, it will only pull the
necessary object out of the DB.
Now, it is possible for this to degrade under the right conditions, but I'm
having a hard time envisioning them. Particularly because if you're using
localObject(), you really should be using shared caches. If not, you're
going to see some pretty strange behavior and I would not recommend it all.
-- KevinOn 11/3/07 1:25 PM, "Mike Kienenberger" <mkienen..mail.com> wrote:
> Fetching one painting from the database is slower than copying one object. > Fetching 300 paintings from the database is slower than copying 300 objects. > > Copy operations run at the speed of memory. Database operations run > at the speed of networking and/or file I/O. > > > On 11/2/07, Marcin Skladaniec <marci..sh.com.au> wrote: >> Hi Mike >> Thats exactly what I mean: localObject is copying one object at the >> time. So say I have in my contextA 1 Gallery with 300 related >> Paintings, all with PersistentState.COMMITED. I do >> contextB.localObject on Gallery, then I access every Painting via >> relaionship. this means that the localObject will be invoked 301 >> times, everytime with single object. I believe this will be faster >> than re-fetching the data, but what if there will be 3000 Paintings ? >> Is there a limit after which the localObject becomes slower than re- >> fetch ? >> >> Marcin
This archive was generated by hypermail 2.0.0 : Sun Nov 04 2007 - 10:56:03 EST