When used a tool to monitor the memory usage (heapy). I couldn't reproduce the 
issue. It turned out the tool was forcing the garbage collector run and collect 
all collectible objects. Then I noticed if I add gc.collect() to line 817 in 
phatch/core/api.py (after the del statement) the memory will be freed after 
each image as it should. The problem with this is that it slows down processing 
for small images, while speeding it for large images. I don't think this is a 
solution at all. Could be a temp fix. But obviously there is a bigger issue 
behind it. I tried to set the gc threshold to something small like 50, 2, 2 but 
that didn't make a difference. I also enabled debugging mode in gc and I still 
have no clear idea on what is going on. I don't think it is a circular 
reference issue otherwise gc.collect won't be able to collect the objects.
I'm still working on debugging the issue. This is just an update.

-- 
Phatch eats-up nearly all the RAM and swap available
https://bugs.launchpad.net/bugs/525999
You received this bug notification because you are a member of Phatch
Developers, which is subscribed to Phatch.

Status in Phatch = Photo & Batch!: In Progress

Bug description:
Ubuntu 9.10
Phatch 0.2.5 from PPA
1go RAM
2go swap


I am trying to rename about 200 photos taken with a 10MP camera, the photos are 
between 4 and 5Mo each. I am renaming them using the exif data 
(<Exif_Photo_DateTimeOriginal.year>-<##Exif_Photo_DateTimeOriginal.month>-<##Exif_Photo_DateTimeOriginal.day>).
 This action takes less than 1min with phatch 0.1.6 but it takes more than an 
hour with phatch 0.2.5. Phatch uses 80% of the RAM and swap available. See 
picture attached of the freed memory when Phatch is stopped.



_______________________________________________
Mailing list: https://launchpad.net/~phatch-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~phatch-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to