[Zope] zope.org Members list

Martijn Pieters mj@digicool.com
Sat, 11 Mar 2000 11:48:50 +0100


From: "Michel Pelletier" <michel@digicool.com>
> Martijn Pieters wrote:
> > Actually, the Members roster is a bit more efficient. It uses caching to
> > store the results. This was added only recently, before the roster was
> > offline for a while because it was taking too much resources.
> >
> > folders, and check wether or not they are listed. From listed Folders
(just
> > over a 1000 now), we store the id and title in a list. This list is
sorted
>
> 1000 is still too many to be efficient in a regular folder.  You're
> right that a BTree is probably the way to go here.  I didn't know about
> the caching efforts, it seems like you went through some hoops to come
> up with a better solution.

Note that the 1000 items is a sorted list of (id, title) tuples, _not_
Folder object references.

Once the cache is filled, we only have to display the precooked numbers,
take one _.len() of the listed members list for display, and have dtml-in do
it's magic on the afore-mentioned list.

The problem lies mostly in the fact that we have to access each and every
Member Folder to check if it is listed. Even if we use a BTree, we'd have to
load every Folder into memory. The same for the User objects in acl_user.

Martijn Pieters
| Software Engineer    mailto:mj@digicool.com
| Digital Creations  http://www.digicool.com/
| Creators of Zope       http://www.zope.org/
|   The Open Source Web Application Server
---------------------------------------------