[Zope-dev] How to get object count in a folder?

Choo Zhi Min zhimin at iss.nus.edu.sg
Sat Sep 27 11:21:37 EDT 2003


Hi,

I want to get the object count in a folder (Zope/Plone folder). Doing 
len(myfolder.objectValues()) will load every object in that folder into 
memory while all I need is just a count of them. Any better way to do this 
to avoid unnecessary memory usage?


Thanks!
Zhi Min




More information about the Zope-Dev mailing list