Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8857135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:31:08+00:00 2026-06-14T14:31:08+00:00

I read several ZODB tutorials but here is one thing I still don’t get:

  • 0

I read several ZODB tutorials but here is one thing I still don’t get: How do you free memory that is already serialized (and committed) to the (say) FileStorage?

More specifically, I want the following code to stop eating all my memory:

for i in xrange(bignumber):
    iobtree[i]=Bigobject() # Bigobject is about 1Mb
    if(i%10==0): 
        transaction.commit() # or savepoint(True)
transaction.commit()

How can this be achieved? Is it possible to release references stored by iobtree and replace them by ‘weak references’ that would be accessible on demand?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T14:31:09+00:00Added an answer on June 14, 2026 at 2:31 pm

    Creating savepoints and commiting the transaction already clears a lot of you memory.

    • You’ll need to check what your ZODB cache parameters are set to, and tune these as necessary. The cache size parameter indicates the number of objects cached, not bytes, so you’ll have to adjust this based on the size of your objects.

    • You can try and call .cacheMinimize() on the ZODB connection object, this explicitly deactivates any unmodified (or already committed) objects in the cache.

    Other than that, do note that even when Python frees objects from memory, the OS doesn’t always reclaim that freed memory until it is needed for something else. OS-reported memory usage doesn’t necessarily reflect actual memory requirements for a Python process.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read several tutorials but I still do not have any clue :-)
I read several posts regarding this but still don't understand how to solve my
I've read several questions here that seemed to be related (either directly or indirectly)
I read several threads on here about structs (one about mutable structs) and I
I have read several tutorials, but I just can't this to work. My apache
I've read several posts here about ignoring files in Mercurial but I'm stumped on
I've read several threads dealing with similar issues on here, but I just can't
I've read several different questions from SO about this already but still haven't been
I have read several posts about WSDL and SOAP but still I'm confusing the
I have read several articles on when to use nested classes, but none that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.