What technique does this website use to consume all the processing power of the machine?

3

This site: link has a system to create an automatic equipment build, it will test all possible equipment until it reaches the conclusion of which was better in the character. There is an option to use more than 1 core of the processor, and when activated using all colors, the processing goes to 100% instantly, is there any native function in Chrome that allows to manipulate the use of the processor, for example to use all its capacity?

    
asked by anonymous 18.11.2018 / 06:59

1 answer

1

JavaScript, by default, is single thread: it can run only one program on a CPU (core).

I think it would be necessary to use Web Workers: link .

  

Web Workers are mechanisms that allow an operation of a given   script runs on a thread other than the main thread of the   Web application. Allowing laborious calculations to be processed   without blocking the main thread (usually associated with   interface).

So it would be possible to use workers on separate cores, allowing up to 100% CPU utilization.

link

    
10.12.2018 / 19:38