Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Gimp Script Memory Problem Question
#7
(12-20-2021, 08:11 PM)KoalaBear2022 Wrote: I am getting still the same result. I even disabled/enabled the Undo with image.disable_undo()/ image.enable_undo() which could possibly reduce memory consumption.

Are you modifying/processing your image at each iteration?

I am guessing GIMP is saving some Data once you change/modify something on your image.
ChameleonScales mentioned the use of pdb.gimp_item_delete because GIMP apparently does save this information on each iteration. But I am not sure on what "items" I would need to delete. I am not even sure what exactly an item is. Total Noob but also almost no info on the net.

***
I just tested again and apparently gimp.image_list() returns increasing numbers just before I perform image.delete at each iteration;

So this would be for iteration 37  before image_delete: Image List: (2, (38, 1))
and after using pdb.gimp_image_delete(new_image): Image List: (1, (1,))

This would be for iteration 38  before image_delete: Image List: (2, (37, 1))
and after using pdb.gimp_image_delete(new_image): Image List: (1, (1,))

and so on:
And iteration 100 would be Image List: (2, (99, 1))
and again after pdb.gimp_image_delete(new_image) Image List: (1, (1,))

and so on.. so that means Image List is actually increasing somehow even though it would show (1, (1,)) immediately after using pdb.gimp_image_delete(new_image)

You have all of my code. Do you see a memory creep when you use it?

These increasing numbers are expected, The first image has ID 1, the next ID 2, the next ID 3, etc... So you see a list of two images with your initial image (ID 1 and the one for the current iteration (ID 37).

Also, is the moroy creep in the Gimp process or in the Pythin one?
Reply


Messages In This Thread
RE: Gimp Script Memory Problem Question - by Ofnuts - 12-21-2021, 01:17 AM

Forum Jump: