From: John F. <jf...@ms...> - 2009-09-04 12:55:22
|
We (MSI) have just released a development version of our memory mapped MOP database. There's a lot that can be improved with it but it has a test suite and has been bashing stuff out for a while. http://github.com/ilitirit/manardb/tree/master Object instantiation seems a little slow on SBCL (just my impression compared to Allegro 8.1 -- could be completely wrong) and I wonder if there is something I'm doing wrong? Basically each mm-object of a class descended from mm-metaclass has a normal instance %ptr slot which gives an index into our mmap'd regions. I guess should play more with allocate-instance and avoid doing initialize-instance. Any wisdom appreciated! Unfortunately as all mmap slots are always boundp, we have to munge the general initialize-instance to set default slot values. This is quite unfortunate. Is there a more sensible way of doing this (along the lines of the way structure slots are handled)? The normal slots are mmap'd, which are persistently stored in the mapped regions and are accessed via overridden slot-value-using-class. This is just (defmethod slot-value-using-class ((class mm-metaclass) (object mm-object) (slotd mm-effective-slot-definition)) (declare (ignorable class)) (funcall (the mm-slot-definition-reader (slot-definition-reader-function slotd)) object)) (defmethod (setf slot-value-using-class) (new-value (class mm-metaclass) (object mm-object) (slotd mm-effective-slot-definition)) (declare (ignorable class)) (funcall (the mm-slot-definition-writer (slot-definition-writer-function slotd)) new-value object)) I notice that SBCL does a similar thing with its normal slots, but when I tried to hook my compiled lambdas into sb-pcl::slot-definition-writer-function, it crashes. Is that because I am doing it wrong(tm) or is there some magic to follow? |