[Magma] test result

Stephen Pair spair at acm.org
Sun Aug 4 03:45:23 UTC 2002


Chris,

I tried a test to add a dictionary with 1000 entries (all keys and
values are strings) to the database.  The following is the code (where
self is a MagmaSession):

Time millisecondsToRun: 
	[self commit:
		[| tmp |
		tmp := Dictionary new.
		1 to: 1000 do: [ :in | tmp at: in asString put: in
asString ].
		self root at: 'er2' put: tmp]].

The commit operation took about 5 hours (PIII 1Ghz...running a single
user MagmaSession).  I haven't had a chance to see why it's taking so
long.  I also didn't try reloading the dictionary.

- Stephen

> -----Original Message-----
> From: squeak-dev-admin at lists.squeakfoundation.org 
> [mailto:squeak-dev-admin at lists.squeakfoundation.org] On 
> Behalf Of Stephen Pair
> Sent: Saturday, August 03, 2002 10:55 PM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: RE: Magma design
> 
> 
> Right...you have a couple of choice under these conditions:
> 
> A) Never permanently keep references to *any* persistent 
> object...you just access them by travarsing the persistent 
> objects from the root whenever you need to do something 
> (stubbing everything in along the way)...this might severely 
> impact performance for certain apps because every operation 
> (think about an http request that is very frequently called 
> and that needs to get at some persistent objects...on ever 
> http request, you'll be fetching the root, then another 
> object, then another, until you get to the one you want).  
> This is in a sense a cache strategy that flushes *everything* 
> immediately after it is used.
> 
> B) Keep persistent objects around that your app needs and 
> risk faulting in the entire db over time...this might not be 
> an issue for applications that don't run for long periods of 
> time.  This is essentially a cache strategy that never 
> flushes anything.
> 
> C) Implement your own caching scheme in your application 
> (i.e. hold the objects you are frequently using, but re-stub 
> those that haven't been used in a while).
> 
> All of these are cache management strategies.
> 
> - Stephen
> 
> > -----Original Message-----
> > From: squeak-dev-admin at lists.squeakfoundation.org
> > [mailto:squeak-dev-admin at lists.squeakfoundation.org] On 
> > Behalf Of Chris Muller
> > Sent: Saturday, August 03, 2002 7:25 PM
> > To: Squeak List
> > Subject: Re: Magma design
> > 
> > 
> > Stephen Pair wrote:
> > 
> > ...the issue I see is that you can
> > eventually get the whole database in memory (if your
> > application runs long enough and works with enough of your 
> dataset).  
> > 
> > ======
> > 
> > No way dude!  :-)  Magma doesn't keep around any objects your
> > program doesn't,
> > *including* the root.
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Health - Feel better, live better http://health.yahoo.com
> > 
> > 
> 
> 
> 




More information about the Squeak-dev mailing list