[Zope-CMF] Question, re: folders w/ thousands of items

Shane Hathaway shane@zope.com
Wed, 07 Aug 2002 10:21:30 -0400


Sidnei da Silva wrote:
> On Ter=E7a 06 Agosto 2002 21:39, sean.upton@uniontrib.com wrote:
> | I have a CMF-based project that I am setting up that happens to have =
1000s
> | of objects within a given folder.  One issue that I have is that most=
 of
> | the methods called by some skins (I'm using Plon for this project) ar=
e way
> | too expensive... I want to be able to call something like
> | Folder.contentValues(), but only for a limited subset of items (like,=
 say,
> | return the first 20 items in the folder)...  Perhaps some alternative=
 to
> | the standard OM API somewhere to access stuff within either a Portal =
Folder
> | or BTreePortalFolder?
> |
> | Does such a fix exist?
>=20
> Ive seen an implementation of a CMF Portal Folder based on BTreeFolder2=
=20
> somewere on CVS, but i cant remember where. I will try searching and se=
nd you=20
> the URL.

It's bundled in BTreeFolder2.  If you have CMF installed, the product=20
makes the "CMF BTree Folder" type available.

BTreeFolder2, BTW, is a much more scalable alternative to BTreeFolder.=20
It has no trouble storing as many items as the ZODB will hold, and the=20
UI shows batches of 1000 items, so now even the UI won't load all=20
objects at once.  It stores in a slightly different format, but it's=20
easy to convert BTreeFolders to BTreeFolder2's.

Now if someone would just volunteer to write a conversion script with a=20
good UI, I could make an official release.  :-)  (Hint: use=20
BTreeFolder2._populateFromFolder().)

Shane