Nguyen Quan Son wrote:
> Hi,
> I have a problem with performance and memory consumption when trying
to do some statistics, using following code:
> ...
> docs = container.portal_catalog(meta_type='Document', ...)
> for doc in docs:
> obj = doc.getObject()
> value = obj.attr
> ...
>
> With about 10.000 documents this Python script takes 10 minutes and
more than 500MB of memory, after that I had to restart Zope. I
> am running Zope 2.6.1 + Plone 1.0 on Windows 2000, Xeon P4 with 1GB RAM.
> What's wrong with this code? Any suggestion is appreciated.
> Nguyen Quan Son.
Most likely you are filling the memory of your server so that you are
swapping to disk.
Try cutting the query into smaller pieces so that the memory doesn't get
filled up.
regards Max M
_______________________________________________
Zope-Dev maillist - [EMAIL PROTECTED]
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 )
- [Zope-dev] Catalog performance Nguyen Quan Son
- Re: [Zope-dev] Catalog performance Romain Slootmaekers
- Re: [Zope-dev] Catalog performance Max M
- Re: [Zope-dev] Catalog performance John Barratt
- [Zope-dev] Re: Catalog performance Simon Michael
- Re: [Zope-dev] Re: Catalog performanc... John Barratt
- [Zope-dev] Re: Catalog performan... Simon Michael
- Re: [Zope-dev] Re: Catalog perfo... Toby Dickenson
- Re: [Zope-dev] Catalog performance - SOLV... Nguyen Quan Son
- Re: [Zope-dev] Catalog performance Chris Withers
- Re: [Zope-dev] Catalog performance John Barratt
- Re: [Zope-dev] Catalog performan... Chris Withers
- [Zope-dev] Re: Catalog performance Seb Bacon