YouTube CPU Tamer by DOMMutation

减少YouTube影片所致的能源消耗

作者
DR LEONK
日安装量
2
总安装量
30
评分
0 0 0
版本
2025.02.24.0
创建于
2025-03-31
更新于
2025-03-31
大小
22.0 KB
许可证
MIT
适用于

Optimize YouTube CPU Usage - Non GPU Accelerated Hardware/Browser

Compatible with Tampermonkey / Violentmonkey / FireMonkey
Description
This userscript reduces CPU and energy consumption on YouTube pages (main page, embedded videos, live chats, and YouTube Music) by optimizing JavaScript timer management.

- Faster performance: Reduces unnecessary task execution.
- More stable playback: Prioritizes video-related tasks.
- Lower battery usage: Minimizes CPU load, especially on laptops and mobile devices.

Note 1: Overrides native setTimeout, setInterval, clearTimeout, and clearInterval functions.
Note 2: Adjusts task frequency in background tabs to save energy.

Script Description
"YouTube CPU Tamer by is a userscript crafted to lower your browser's energy footprint while streaming YouTube videos. Here's how it works, what it does, and how to use it:
What does it do?
The script optimizes JavaScript timers (setTimeout and setInterval) that YouTube heavily relies on, reducing CPU usage and power consumption for a smoother, more efficient experience.
How does it work?
Upon activation, it performs these key operations:

1. Custom Timer Overrides: Replaces native setTimeout and setInterval with versions that use requestAnimationFrame, syncing tasks with the browser's rendering cycle to cut down on redundant processing.
2. Optimized Task Scheduling: Employs a continuous requestAnimationFrame loop to manage pending tasks, enhancing efficiency over traditional timers, especially for animations and UI updates.
3. Interval Management: Balances the execution frequency of recurring tasks to maintain functionality without overloading the CPU.
4. Background Optimization: Reduces task execution rates in inactive tabs, leveraging browser throttling to conserve energy.
5. Error Prevention: Includes safeguards against duplicate calls and ensures compatibility with YouTube's dynamic loading.
How to Install and Use:
1. Install a userscript manager (e.g., Tampermonkey, Violentmonkey, or FireMonkey).
2. Add the script via your manager.
3. It runs automatically on YouTube pages—no further action required.

Effectiveness may vary based on device specs, YouTube page type, and other extensions. Keep your browser and manager updated for best results.

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址