akirakyle / emacs-webkit

An Emacs Dynamic Module for WebKit, aka a fully fledged browser inside emacs
GNU General Public License v3.0
419 stars 24 forks source link

Feature request: pause browser to regulate CPU usage #33

Closed austinweisgrau closed 2 years ago

austinweisgrau commented 2 years ago

Webkit obviously uses a lot more CPU than your average emacs buffer.

Even once a page has loaded, webkit consumes a ton of resources as long it's open. I assume it's continuing to parse javascript, stay available for websocket activity, etc.

It would be great if once a page is loaded, webkit had an option to "pause" a page, continuing to allow interaction but seriously reducing or totally halting any active processing.

akirakyle commented 2 years ago

I don't think the webkitgtk api exposes anything like that so there's nothing that can be done here unless it gets implemented there first. The closest there was to something like this was webkit_web_context_set_web_process_count_limit bet it has since been deprecated for security reasons.