10-17-2021, 12:14 PM
(This post was last modified: 10-17-2021, 12:32 PM by ChameleonScales.)
A plug-in I'm developing (in pythonfu), which does batch processing on multiple xcf files, performs several times faster when I use ~3 threads compared to when I use all my CPU threads (32) or some good percentage of it (24). Not sure why, I guess either the RAM or SSD drive is choking when I use too many threads.
Right now I can control the number of threads by going in Gimp's preferences but I would like to keep it high when I use Gimp's interface and low for my plug-in, so I would need a way to change or override it from within the code of my plug-in, so as to not do it manually every time I use it.
I didn't find a config file where this could be changed via text replacement, nor did I find any command for it.
Also I can't do it by forcing the entire plug-in to use less threads because it contains a progress bar which needs some CPU power in order to not freeze.
Is it at all possible ?
Right now I can control the number of threads by going in Gimp's preferences but I would like to keep it high when I use Gimp's interface and low for my plug-in, so I would need a way to change or override it from within the code of my plug-in, so as to not do it manually every time I use it.
I didn't find a config file where this could be changed via text replacement, nor did I find any command for it.
Also I can't do it by forcing the entire plug-in to use less threads because it contains a progress bar which needs some CPU power in order to not freeze.
Is it at all possible ?