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
Live Update Memory Growth #845
Comments
That sounds weird. It should be bouncing on the undo stack for that, and that ought never to grow that big. It shouldn't ever be pushing more than one thing total too. Does forcing a gc fix it, or reveal any non-collectable objects? cPython memory allocation is a bit odd, in that it's basically a big hash table whose allocation never diminishes even if objects get collected. The space will get reused, however. |
Actually on windows the memory does go back down pretty quickly after I stop dragging the sliders. It wasn't doing that on linux. I'll try garbage collection on linux. . . |
Ok I ran the "Print Memory Leak info to console" before and after doing the tasks to create 2GB of memory usage. The one that pops out to me is: INFO: lib.helpers: MEM: DELTA +1542 Processor <class 'lib.idletask.Processor'> INFO: lib.helpers: MEM: garbage collector run, collected 1110 objects Here is a sample of me just loading mypaint, running the "Print Memory Leak.." and then just doodling for a bit with the same pencil (and running Print memory leak again). This is NOT going into the brush editor at all: INFO: lib.helpers: MEM: garbage collector run, collected 1389 objects |
Splitting this issue from mypaint/libmypaint#99
Using Live Update can cause enormous memory growth and potential memory exhaustion.
Tested on a fresh config of plain master (libmypaint and mypaint) on Debian Stretch, and also on Windows 10 with build 1.3.0-alpha+git.f03e5ec5. Was able to reproduce this memory issue with just a plain deevad 2b pencil and jitter assigned to random input.
Steps to reproduce:
The memory does not seem to be released until you quit mypaint. Also, after the memory growth it seems like mypaint peformance lags considerably with complex brushes for a few minutes and then speeds up again, although the memory consumption remains high. Changing the brush can also make the performance go back to normal.
Even if you attach the same setting to "Stroke" you won't see the memory issue. I would think a stroke input w/ a long stroke length would be very similar to moving the sliders through all the values, but no, Live Update behaves totally differently than an actual brush. Also it's probably not related to the actual slope of mappings since I originally observed the issue with just changing the base_value on a setting (the beta gribmap setting).
The text was updated successfully, but these errors were encountered: