-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enumerating over pypxlib.Table causes memory leak #29
Comments
I have the same issue as well. Is there a way to iterate over a table that does not cause a memory leak? Million thanks for this library, very useful. |
Here is an example of code that I use to iterate over the table (which causes memory leaks) with Table(path_table) as table:
data = (row.x, row.y, row.z for row in table if row.z > 0)
process(data) # this saves the data to some postgresql database on the cloud When running this snippet for multiple tables one after the other, the memory usage keeps increasing until we run out of memory and the program crashes. I would be interested in learning of a work around that does not have the memory leak side effect. |
I had the same issue and never found a way to stop the memory ballooning. It's been quite a while but if I remember right, this isn't actually an issue with pypxlib, but more an issue of how python does garbage collection with CTypes. I DID get around the problem though. I switched to a 64-bit python interpreter and allowed my program to allocate more memory. GC does eventually catch up--my py script iterates over 16 million paradoxdb records and converts them to mssql in about an hour, without any memory related crashes. Hope that helps, and I'm sorry you're in the same boat as me, dealing with a paradox database in 2022! |
@fievelmousekewitz thanks. |
I may be doing something incorrectly, but when using enumerate() over a Table object, memory balloons out of control and isn't released. I don't immediately have a fix, but I wanted to document it for others that might struggle with the same. Fantastic library, a million thanks for it.
The text was updated successfully, but these errors were encountered: