Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Chrome Reaper (github.com/usnistgov)
86 points by DaveFlater on Dec 19, 2023 | hide | past | favorite | 20 comments
Reaper is a Chrome (or Chromium) browser extension that terminates browser processes when they use too much CPU. Anything that the browser regards as a process is a potential target. This includes tabs, renderers, subframes, other extensions, and itself.

It works on stable channel Chrome for Linux but requires dev channel on Windows, MacOS, or ChromeOS. See README for details.



Brave's shields against ad & tracking inserts seem to help against many of the cycle-stealers that affect standard Chrome… except for the occasional times where they perhaps trigger cycle-consumptive bugs by breaking assumptions of remaining JS.

I'd really prefer a browser to give a good estimate of an individual tab's perceptible load/contribution-to-lag – via some blended measure of CPU/interrupts/wakes/events – and give me a ranked, stable view of offenders, with an easy kill/reload/'nice' control.

The Chrome et al 'Task Manager' has only scraps of what's needed - with its noisy, jumpy process-centric view that hides obscures the load of individual tabs, offers only process kills rather than per-tab management, and often foregrounds internal processes that the user can hardly do anything about (or map to the truly-responsible web content).


Very cool to see government sponsored open source.

IMHO investing in open source is one of the most strategic things that the US government can do over the upcoming decades. Think about how many trillions of dollars in value has been built on open source software in the US... it's mind boggling how much ROI there is on that stuff.


This software was developed by employees of the National Institute of Standards and Technology (NIST), an agency of the Federal Government and is being made available as a public service. Pursuant to title 17 United States Code Section 105, works of NIST employees are not subject to copyright protection in the United States.


Keep reading. It's surely open source, but the license is mixed due to reuse of previous work that was CC-By 3.0 and similar.

An R package that I did was blocked from CRAN solely because they wanted me to choose a license from a fixed menu and I legally could not. Such policy creates a perverse incentive to not acknowledge previous work or to rationalize about the point at which the code is so mutated that it is no longer derivative.


Chrome kinda already have this built-in, it is called Memory Saver under the Chrome Settings[0].

This is its description directly from Chrome Browser: "Memory Saver - When on, Chrome frees up memory from inactive tabs. This gives active tabs and other apps more computer resources and keeps Chrome fast. Your inactive tabs automatically become active again when you go back to them."

You can also whitelist Tabs/Websites: "Always keep these sites active: Sites you add will always stay active and memory won't be freed up from them"

I understand that this extension frees up CPU and memory from sites that might be unoptimized and/or malicious but if you have Memory Saver turned on, it will free up everything except as they say, tabs that have[0]:

Active audio or video (playback or calls), Screen share, Page notifications, Active downloads, Partially filled forms, Pinned tabs, Connected devices (USB or Bluetooth)

[0] https://support.google.com/chrome/answer/12929150?visit_id=6...


While I believe Memory Saver was a great improvement, it only works if the tab is hidden or the window minimized. I recently learned the required state is not triggered if the tab is open but on another virtual desktop. At least this is the case with many of not all Linux window managers. Some of the many discussion threads on the topic:

https://github.com/i3/i3/issues/4353 https://www.reddit.com/r/i3wm/comments/5y34xu/send_windows_o...


I wish this worked for Firefox


Porting this extension to Firefox should be relatively straightforward using the webextension polyfill: https://github.com/mozilla/webextension-polyfill


Does the chrome.processes API exist in Firefox?


Nope


THAT SOUNDS LIKE A JOB FOR FIND/REPLACE!

runs off into the darkness to spread more knowledge


US NIST, doing the important work. Very cool, very useful.


Is this your side project or something NIST uses?


It was incidental to software metrology. CPU utilization is a measurable quantity. The question is what can we do with that.


(Is this something you can share?)



Chrome Reaper...

CReaper.


ssssssssss


I don't see the point of this. Why wouldn't you just use Firefox instead?

Chrome is malware.


There are good chromium based browers which also benefit from this extension.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: