Michael Bayer schrieb:
in version 0.4, the session is weak referencing so that objects which are not elsewhere referenced (and also are not marked as dirty or deleted) fall out of scope automatically. that is documented at:
> http://www.sqlalchemy.org/docs/04/session.html#unitofwork_using_attributes

I have a question which I think is similar enough to be asked in the same thread: I have a set of quite simple migration scripts which us SQLAlchemy 0.4 and Elixir 0.4. I do extract data from the old legacy (MySQL) database with SQLAlchemy and put this data into new Elixir objects.

Currently, these scripts use up to 600 MB RAM. This is no real problem as we probably could devote a machine with 4 GB ram solely for the automated migration. But it would be nice to use lower-powered machines for our migration tasks.

What wonders me is that I do not (knowingly) keep references neither to the old data items nor the new elixir objects. Nevertheless memory usage increases during the migration. Is there any way to debug this easily to see why Python does need so much memory/which references prevent the objects from being garbage collected? Running the garbage collector manually did not help much (saving only about 5 MB).

fs

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to