Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Control nb of threads
#1
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 ?
Reply


Messages In This Thread
Control nb of threads - by ChameleonScales - 10-17-2021, 12:14 PM
num-processors - by Gimphried - 10-17-2021, 05:35 PM
RE: Control nb of threads - by ChameleonScales - 10-17-2021, 06:48 PM
RE: Control nb of threads - by Ofnuts - 10-18-2021, 07:00 AM

Forum Jump: