Tuesday, May 31, 2011

Fuel in SandstoneDB

Ramon now included Fuel into SandstoneDB. Here is the comment from "SandstoneDb-RamonLeon.141.mcz":

Introduced a dependency on the Fuel serializer. You can load it first with...

Gofer new
squeaksource: 'Fuel';
package: 'ConfigurationOfFuel';
load.
((Smalltalk at: #ConfigurationOfFuel) project latestVersion) load: #(Core Tests Benchmarks).

It's smoking fast compared to SmartRefStreams. A 200 object commit with SmartRefStream on test machine takes around 2.2 seconds, .41 seconds with Fuel.

Passes all tests. SmartRefStream is still the default for now so loading this won't change anything or corrupt existing databases. To set fuel as the default serializer evaluate...

SDFileStore serializer: SDFuelSerializer new.

This will of course invalidate any existing db based on SmartRefStreams. To migrate, simply resave all of your objects. This would require grabbing all objects first into some temp arrays, changing the serializer, then calling save on all objects.

So startup Pharo and try it out.

No comments: