Forum moved here!

Home / Why does SumatraPDF not use all CPU cores?


On my PC SumatraPDF is only using around 10% of my total CPU… it seems to be using only 1 or 2 cores. Yet certain documents can take forever to load… simply because OpenJPEG isn’t decompressing the images fast enough… Now that OpenJPEG supports multithreading shouldn’t SumatraPDF be taking advantage of that? For that matter shouldn’t each page being rendered be on a different thread for the best performance? It would definitely make a big difference on my PC with the high resolution PDF documents I have to handle…


All good ideas. It’s implementing them that is hard.


Apparently you can use the env variable OPJ_NUM_THREADS:

You also need to build OpenJPEG with MUTEX (Win32) support.

And I think you have to make it so several images are being sent at once to the OpenJPEG “codec” instance, instead of just one.

I would do it myself but I have only very basic C/C++ knowledge so all I did was fool around trying to edit the code and look like an idiot.