On Jan 17, 2008, at 11:57 AM, Flavio Coelho wrote:

Some progress!

Apparently the combination of:

helped. Memory consumption keeps growing but much more slowly (about 1/5 of the original speed). Please correct me if I am wrong, but I believe that ideally memory usage should stay constant throughout the loop, shouldn't it?

Are you still using the example code you gave in a previous message? If so, you are generating and storing user objects in a list, which grows. If not, maybe give a snippet of your current example code.

Moreover, I shouldn't need to commit either, since I am not modifying the objects...

You need to tell the ZODB about the transaction boundary so it knows when to "let go". transaction.abort() would work too. You could also manually much with the persistent object cache I suppose, though _p_deactivate should be doing most of what would help... "ghosts" (deactivated objects) still take up some memory.


For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to