On Fri, Feb 20, 2004 at 07:48:52PM +0000, John J Lee wrote:
> [PersistentMapping and PersistentList are] just there to provide
> convenient replacements for small lists and dicts, to avoid having
> to set ._p_changed every time you mutate them, right?
That's right.
> If that's true, though, I don't understand why Dulcinea uses them
> in several places where it seems you'd want loading-on-demand (for
> example, persistent_list.py, user_database.py).
In the past, we avoided BTrees because they were somewhat buggy.
Zope Corp has since then done a lot to improve the BTree code. They
should be safe now.
> Is it simply that Dulcinea doesn't care about large numbers of
> users or large specified_lists? Or am I wrong about the on-demand
> behaviour of Persistent{List,Mapping}?
It's mostly a matter of memory usage. Our machines have lots of
memory. OTOH, using BTrees in places would probably help improve
startup time.
Neil