[Zope-dev] BTree Folders

2001-01-05 Thread Chris Withers

Hi,

There was talk a while back of re-doing BTree's in Zope so they were
more efficient. Is that still going ahead?
If I start using BTree folders now, will there be any nasties when the
changes happen?

Right, BTree folders wise, what I'm looking for is to have, in effect
two Contents tabs for one BTree folder object, one showing all contained
items of a particular meta_type (with the BTree Folder's interface to
deal with lots of objects), and the other containing all other items in
the folder (DTML Methods, Gifs, etc, with a normal folder's interface).

What's the best way to do this?

I was going going to subclass BTreeFolder, and overide the contents tab
and provide an extra one, copying and hacking the DTML as appropriate to
filter on meta_type. this strikes me as not very robust as I won't
benefit from any improvements to either GUI that are made in the future.
Is there perhaps a better way?

Also, what's the difference between a 'Full' and a 'Basic' BTreeFolder,
which one should I use?

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 Folders

2001-01-05 Thread Steve Alexander

Chris Withers wrote:


 Right, BTree folders wise, what I'm looking for is to have, in effect
 two Contents tabs for one BTree folder object, one showing all contained
 items of a particular meta_type (with the BTree Folder's interface to
 deal with lots of objects), and the other containing all other items in
 the folder (DTML Methods, Gifs, etc, with a normal folder's interface).
 
 What's the best way to do this?

If you're using ZPatterns anyway, you might like to look at PlugIns. The 
idea with PlugIns is that a PlugIn manager delegates the handling of 
objects it contains to its various PlugIns. Typically, a PlugIn will 
claim objects based on the object's meta-type.
PlugIns appear in the user-interface as separate tabs. See the 
Customizers and Data Plug-ins tabs in a Folder w/ Customizer Support 
instance for an example.

--
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net


___
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 folders: opinions?

2000-09-05 Thread Shane Hathaway

Steve Alexander wrote:
 
 I've been reading the discussions on benchmarks of BTreeFolder verus
 standard ObjectManager dict based folders.
 
 I have a BTreeFolder w/ Customizer support that I'd like to include in
 the DataSkinAddons package for its next release. I'll probably release a
 LargeUI Folder w/ Customizer Support, that has the BTreeFolder UI
 anyway.
 
 However, I'm not sure whether to store the folder contents in a dict or
 a BTree.
 
 Are dictionaries or BTrees the way to go for folders with lots of
 sub-objects?
 Anyone tried any other benchmarks?
 
 I *suppose* it could even be configurable:
 
 How about this for an idea:
 
 * Management interface uses the standard Folder interface when the
   number of objects in the contents are less than a certain amount.
   With more objects, it switches to the BTree Folder UI.
   This number can be reconfigured as an attribute of the folder.

Have you considered a batching UI?  The consensus here at DC when we
had the meeting about big folders was that folders with lots of objects
ought to batch.  However, once I saw how fast a simple list is, I lost
interest in batching.

 * You can switch between using a dict and a BTree to store the
   sub-objects, on an instance-by-instance basis. The switch-over
   will be slow, but it will be easier than changing the base-class
   of existing instances.

You'll probably get the biggest win just by replacing the custom
__getattr__ method with a C version.  I understand that switching from
C to Python and back to C again is expensive, but a C version would
turn the path into C-C-C.  It might level the benchmarks.

Shane

___
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 )