Re: [Zope-dev] BTree upgrading

2001-04-04 Thread Chris Withers

Chris McDonough wrote:
 
 This looks about right.  Threshhold is the number of key-value pairs moved
 before a subcommit and cache flush, I believe.  So 200 should be OK...
 probably higher, even.

Cool... I feel a new point release of Squishdot brewing :-S

cheers,

Chris

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] BTree upgrading

2001-04-04 Thread Chris McDonough

This looks about right.  Threshhold is the number of key-value pairs moved
before a subcommit and cache flush, I believe.  So 200 should be OK...
probably higher, even.

- Original Message -
From: "Chris Withers" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 04, 2001 9:51 AM
Subject: [Zope-dev] BTree upgrading


 Hi,

 I see the new catalog stuff makes use of new BTrees. I presume the big
 advantages the new catalog has are from these new BTrees. I know of a few
 products which also use these BTrees (Squishdot and some internal ones
here
 spring to mind) so I guess they should be upgraded too?

 Well, I had a look at the _convertBTrees method in Catalog.py and it all
made
 sense, so I'm guessing the folowing would be the correct way to convert
some
 BTrees?

 from BTrees import IOBTree, BTree, convert

 myBTree

 if type(myBTree is not IOBTree):
   mynewBTree = IOBTree()
   convert(myBTree,mynewBTree, 200)

 ...or..

 if type(myBTree is not BTree):
   mynewBTree = BTree()
   convert(myBTree,mynewBTree, 200)

 I'm guessing the 200 is how many items get put in each bucket? What should
 influence the choice of this number?

 cheers,

 Chris

 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] BTree upgrading

2001-04-04 Thread Chris Withers

Chris McDonough wrote:
 
  from BTrees import BTree

gak!

I get an import error here. What happened to the bog standard BTree? I need to
map strings to objects, what should I use now?

cheers,

Chris

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] BTree upgrading

2001-04-04 Thread Chris McDonough

Oops...
from BTrees import OOBTree
b = OOBTree.OOBTree()

- Original Message -
From: "Chris Withers" [EMAIL PROTECTED]
To: "Chris McDonough" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, April 04, 2001 10:45 AM
Subject: Re: [Zope-dev] BTree upgrading


 Chris McDonough wrote:
 
   from BTrees import BTree

 gak!

 I get an import error here. What happened to the bog standard BTree? I
need to
 map strings to objects, what should I use now?

 cheers,

 Chris



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )