Hacker News new | ask | show | jobs
by 6d6b73 3033 days ago
Easy (?) when you install a new browser, it should load few standard pages in the background and check what's their CPU% usage. Get average value for all the tests, multiply it by 2 just to have a little bit of wiggle room. Next time website runs, monitor the usage, if it's over the threshold block the script and ask user if they would like to continue running the script.

I'm not going to file patent for this, thanks in the code will be enough. Enjoy :)

1 comments

Except that fails if the browser is installed while something else CPU intensive is running, an update is installing, an antimalware process is doing its initial analysis, or the device is in battery saver mode.

As an alternative, you could do a survey at install time - check if a battery is present, get power profiles, run your benchmark js stuff, check CPU, RAM, disk type (HDD/SSD) - then download profiles for that/those configuration(s). Then put a 'sensitivity' slider in the advanced options to allow power users to tweak/turn off the limit.

No need to send me code. Cash will do fine.