Hi, On 22/10/2011 7:09 PM, Lukas Renggli wrote:
I do not see how BTreePageOuter is used? Is that your own class? What does that have to do with BTree? I wrote my own BTree, mainly as a learning exercise. I had a look at the other version, but it made my head hurt. Turns out mine is about 20% faster than the version on squeaksource for adds, and nearly twice as fast for deletes. I Generally it is a bad idea to subclass collections. I am not sure, but Is that a general smalltalk principle, or just in regards to Goods?? it could be that GOODS optimizes OrderedCollection access (look for class extension from GOODS in OrderedCollection and superclasses). I couldn't find anything - but I'm quite new to smalltalk, so that's no guarantee. Some other random remarks:
- I am not aware that anybody has used GOODS in the past year on Pharo or even on a Cog VM. So there might be (subtle) bugs. Do the tests pass? Up until now. :) There were a couple of test failures 1.testFlushAllRemovesAllUnreferenced - this was failure 2.testTwoDifferentShapesInDatabase - this was error.
These seemed somewhat esoteric errors to me, so i kept going. All the DB sort of tests passed, which is what i was interested in. So ... I massaged my implementation to move from subclass to component (another learning experience :) and now GOODS is working. I'll do some more testing/playing/learning and report back. I picked GOODS because I wanted to get my brain into OO thinking, and it seemed more OO that other alternatives, but I'll look at GLORP as well. Another learning experience.
- GOODS loads things lazily. So it might be that when you look at things through reflection (like the inspector), they do not load properly. Also you need to make sure not to not access your objects with optimized messages like #== or #yourself, because these do not trigger the loading of the object. Um, I'm not upto optimization tricks yet, so no. :)
Jonathan.