Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Make a freehand selection of a segment within one path
#11
(03-13-2021, 09:29 AM)Ofnuts Wrote:
(03-12-2021, 01:08 PM)J-G1 Wrote: Probably my bulk-action is requiring to much processing power from my mediocre laptop..
Will divide the workload in chunks.

Looks like a bug in Gimp/ofn-path-edits. It looks like there is an underlying undo step created for every operation (one per stroke deleted...), and since you have a big path and many strokes this grows fast. Not that easy to fix, but stay tuned.

Happy to have this confirmed, thank you. Will indeed stay tuned
Reply
#12
Extract strokes still shows here as one undo-stage. I wonder how many to get 10 GB Wink

Easy to free up data-in-memory as you progress, from the undo dock
example: https://i.imgur.com/bCl0Pe7.mp4
Reply
#13
(03-14-2021, 11:36 AM)rich2005 Wrote: Extract strokes still shows here as one undo-stage. I wonder how many to get  10 GB Wink

Easy to free up data-in-memory as you progress, from the undo dock
example: https://i.imgur.com/bCl0Pe7.mp4

Each time the code adds or remove a stroke from the path, the undo management makes a copy of the whole path. In the OP's case, the path is quite big and there are many strokes involved, hence the memory consumption.
However since the code "groups" them, Ctrl-Z undoes all.

But if I disable undo completely things are a lot faster and there is no memory increase.

My fix is to work on a copy of the path (not attached to any image, and so no undo) and then swap it with the original path (so there is only one operation to undo).
Reply
#14
Update: OK, found a way to avoid eating too much memory. On my test path and on a bad case, the picture is 15.3MB and jumps to 255MB with the current version, and to a mere 15.8 MB with the fix. It also runs a lot faster, because 1) Gimp has a lot less undo things to care about and 2) I found a API that disables the Path display update while the script runs.

Now to plug the fix in each of the various OPE operations that require it.
Reply
#15
OK plugin fixed, you can download the latest and greatest. Tell me of any problems.
Reply
#16
(03-21-2021, 09:13 PM)Ofnuts Wrote: OK plugin fixed, you can download the latest and greatest. Tell me of any problems.

Hi Ofnuts,

That is a spectacular fix! Works like a charm, and the amount of time spend to extract/delete lots of paths at once, is reduced to practically nothing.
Thanks a bunch, this will be great for future projects.
Reply
#17
Good Smile Thanks for the report.
Reply


Forum Jump: