[Magma] test result

Chris Muller afunkyobject at yahoo.com
Mon Aug 5 17:19:16 UTC 2002


Stephen pair wrote:

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.

=== answer ===

Actually, the commit only took a few seconds.  The remaining 4.999 hours were
spent in Squeaks Dictionary code after the commit.

When new objects are created, such as the 2001 new objects you created here,
Magma assigns them a "temporary oid".  This is done to 1) know its a new
object, and 2) because the permanent oid has to be determined on the server.

So, part of the commit result is the permanent oid for each temporary oid. 
After returning from the commit on the server, a call to
MagmaSession>>assignPermanentLoidsFrom: goes through the 2001 entries in the
commit result which map the temp oid to its permanent oid and removesKey: the
temp oid and at:put:'s the new.

To sum it up, it was 5 hours for Squeak to do 2001 removeKey's followed by 2001
at:put:'s.  Is this related to the 12-bit hashing issue you brought up
earlier??

Committing 2000 new objects in one transaction is what I'd call a medium-sized
transaction at best, but 5 hours is certainly unacceptable.

What can be done?

__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com



More information about the Squeak-dev mailing list