Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More aggressive CPU usage caps #36

Open
Artoria2e5 opened this issue Nov 24, 2017 · 1 comment
Open

More aggressive CPU usage caps #36

Artoria2e5 opened this issue Nov 24, 2017 · 1 comment

Comments

@Artoria2e5
Copy link
Contributor

Artoria2e5 commented Nov 24, 2017

After #34/#32 is done, it should be possible to allow users to provide a higher CPU usage without much impact. Perhaps an option for 75% or even 100% should be added. Or even better, turn the usage setting into a 10%–100% range slider <input> with snapping (listening to change and setting the value?) to current predefined levels (10, 20, 50) for value ± 5%.

@Artoria2e5
Copy link
Contributor Author

Artoria2e5 commented Nov 27, 2017

Just uncommenting the old <label for="max-usage"> input already gives some interestingly usable combination as the three checkboxes do sync with that range input… Still it's redundant.

Tried some snapping in update(). Feels a bit strange to see values magically change without knowing the levels.

const impactLevels = [10, 20, 50];
// ...
let snap = function snap (value, levels, threshold) {
    for (var level of levels)
        if (value >= level - threshold && value < level + threshold)
            return level;

    return value;
}
// ...
update() {
    this.maxUsage = snap(this.maxUsage, impactLevels, 5);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant