vijay
vijay

Reputation: 11

how to keep CPU usage level low using javascript function

I am trying to develop my apps in Javascript.

I have one function that consumes too much CPU power.
I would like to know a way to control this by code (not with any external application) and restrict the percentage of CPU usage. For example, if it uses 90% of the CPU usage, to make my app consume only a 20%, even if it becomes slower.

It must be done automatically and from within the app. If you could provide any function, it would be fantastic.

Upvotes: 1

Views: 367

Answers (1)

Kenneth
Kenneth

Reputation: 28737

The only thing you can do is improve the function so it's faster.

JavaScript does not allow CPU-throttling.

Upvotes: 1

Related Questions