I am using puppeteer to launch browser pages, each browser page is doing some heavy video processing, it merges videos and send back to the client application. It works well for 10 videos but when there are more videos the merged video becomes jerky.
I have tried to diagnose the issue, what I have found is that the CPU is not being utilized fully instead only one core is being used and the system doesn't let the page use more CPU cores.
I think it is because of the nature of javascript as it is single-threaded and runs on one core only when that core is all used does the page become slow as the system doesn't let the page use more CPU.
Can someone guide me if the issue is because of the single-threaded nature of javascript?
If yes is there any way I can allow a page in the browser to use all CPU cores?