[Seaside] GOODS best practice data storage

Sebastián Sastre ssastre at seaswork.com.ar
Fri May 21 21:12:02 CEST 2004

> A while ago I helped Ken Causey with some benchmarking around
> importing 
> BFAV posts into GOODS.  He has some graphs and numbers up at 
> http://kencausey.com/goodsperf.png .  You'll notice that using BTrees 
> (or TreeSets, which are also included in my BTree package) leads to a 
> much flatter graph than OrderedCollection and Dictionary.  

Avi, I'm curious about DoubleLinkedList, where do you find one in ST?
Anyway, as you say the results of TreeSets and BTrees are promising but
I'm not sure about how to use them. I mean when instantiation a TreeSet
is does not allow to add any object. I've modified sightly and then it
worked. Here is the modified code:

TreeSet>>bucket: anArray includes: anObject
	^ (anArray detect: [:ea | (self value: anObject matches: ea)]
ifNone:[#()]) notEmpty.

Actually the migration script I'm using now is like this (I take out
some time and percentage vars):

	db root: Dictionary new;commit.
	db root at:#items put: TreeSet new.
	db commit.
	1 to: items size do:[:i |
		(db root at:#items) add: (items at:i).
		(i/10) isInteger ifTrue:[ db commit ] ].

Do you think this code should behave as the graph of TreeSets and
BTrees? I'm asking you this because I'm seeing an incremental (but much
lesser than collections and dictionaries) commiting time in the
migration process. I mean, certainly is not a flat behavior and right
now it is in the 679 item and takes an average time of 1656 milliseconds
each time it commits the 10 added items.

I want just to confirm if I'm using it in the right way. 


Sebastián Sastre
ssastre at seaswork.com.ar


More information about the Seaside mailing list