[elephant-devel] Best way of getting a collection size

lists at infoway.net lists at infoway.net
Tue Oct 2 19:49:16 UTC 2007


Funny, but I will be coming across this same need very soon and, like  
Mariano, it would be great to get that information without having to  
traverse all the objects. I think the mixin class would be a great  
addition. Mariano, if you do give that a try, would you mind sharing  
it with the code and hopefully that will make it into future releases?

Thanks

On Oct 2, 2007, at 1:34 PM, Ian Eslick wrote:

> > This probably isn't possible for the BDB data store.  You can get  
> the leaf count for a BDB
> > Btree, but not for a subtree (we multiplex Elephant BTrees on a  
> single, large BDB BTree).
>
> It's not that BDB doesn't provide a count, it's that the way we use  
> their DB doesn't make that count useful.  We don't have a 1:1  
> mapping between lisp persistent-collections and BDB btrees, instead  
> we have an N:1 lisp btree->BDB btree.  I don't have time to go into  
> all the good reasons why, but the problem is on our end of things.
>
> Ian
>
> On Oct 2, 2007, at 12:46 PM, Mariano Montone wrote:
>
>> Perhaps we could provide a mixin class that automatically maintains
>> this count on the lisp side for a user subclass of persistent-
>> collection?
>>
>> Ok. I may try that. It's astonishing for me that the BDB api does  
>> not provide such functionality.
>>
>> Thanks, Mariano
>> _______________________________________________
>> elephant-devel site list
>> elephant-devel at common-lisp.net
>> http://common-lisp.net/mailman/listinfo/elephant-devel
>
> _______________________________________________
> elephant-devel site list
> elephant-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel




More information about the elephant-devel mailing list