durusmail: durus-users: building a large BTree efficiently
building a large BTree efficiently
2005-10-14
2005-10-14
2005-10-14
2005-10-17
2005-10-17
2005-10-17
2005-10-17
2005-10-17
2005-10-19
2005-10-20
2005-10-20
2005-10-20
2005-10-20
2005-10-20
2005-10-26
2005-10-26
2005-10-26
building a large BTree efficiently
David Binger
2005-10-17
On Oct 17, 2005, at 10:56 AM, mario ruggier wrote:

> The 3-line iteration over self._items is where it all happens...
> and it is (almost) pure BTree code. self.get_item_key() just builds
> a tuple of attr values from item. Looking at BTree's and BNode's
> __iter__ methods, not clear to me why this will require all items
> to be in memory.

It is because you can't get the attr values from the item without the
item being loaded,
and Durus does not automatically flush object state from memory
except when shrink_cache()
is called.  (Note that commit() and abort() both call shrink_cache()
so this does method
is not normally called directly by an application.)




reply