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

Asked

Viewed 55 times

3

This site: https://ffbeequip.com/builder.html has a system to create an automatic equipment build, she will test all the possible equipment until arriving at the conclusion of which got better in the character. There is an option to use more than 1 processor core, and when enabled using all colors, processing goes to 100% instantly, there is some native function in Chrome that allows you to manipulate the processor usage, for example to use all its capacity?

  • No, you have no control and could not have under such management, if via browser/engine Apis something like this could be managed, surely it would be used for "evil". Who manages the processes and memory is the own browser engine independently, providing at most a simple panel for the user to kill the processes of the browser (Shift+Esc shortcut in Windows).

1 answer

1

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

I believe that it would be necessary to use Web Workers: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API.

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

It would be possible to use Workers in separate cores, allowing up to 100% CPU capacity utilization.

https://www.html5rocks.com/pt/tutorials/workers/basics/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.