[Zope-dev] How to get object count in a folder?
    Andreas Jung 
    lists at andreas-jung.com
       
    Sat Sep 27 12:08:03 EDT 2003
    
    
  
use objectIds()
-aj
--On Samstag, 27. September 2003 23:21 Uhr +0800 Choo Zhi Min 
<zhimin at iss.nus.edu.sg> wrote:
> 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
>
>
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev at zope.org
> http://mail.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope )
>
    
    
More information about the Zope-Dev
mailing list