Greasy Fork is available in English.

YouTube CPU Tamer by AnimationFrame

YouTube Videolarını Oynatırken Tarayıcının Enerji Etkisini Azaltın

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği yüklemek için Tampermonkey gibi bir uzantı yüklemeniz gerekir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

Bu stili yüklemek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için Stylus gibi bir uzantı kurmanız gerekir.

Bu stili yükleyebilmek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı kurmanız gerekir.

Bu stili yükleyebilmek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

(Zateb bir user-style yöneticim var, yükleyeyim!)

Yazar
𝖢𝖸 𝖥𝗎𝗇𝗀
Günlük kurulumlar
41
Toplam kurulumlar
54.944
Değerlendirmeler
71 6 1
Versiyon
2025.02.24.0
Oluşturulma
29.08.2021
Güncellenme
24.02.2025
Boyut
20,8 KB
Lisans
MIT
Geçerli

English | 日本語 | 中文

This script only works with browsers supporting Graphics Acceleration.

Please make sure you install the script from greasyfork.org, not fake sites.



Minimum Browser Versions:


Inspired by kona's YouTube CPU Tamer

Breaking Change in 2024.02.25

The script is rewritten in 2024.02.25.
  1. 2021.08.29 ↝ YouTube CPU Tamer by AnimationFrame ⇶ General Page (Timer Mechanism)
  2. 2023.06.17 ↝ YouTube Live Chat Tamer
  3. 2023.07.25 ↝ YouTube Super Fast Chat ⇶ Live Chat Page (Data Manipulation, DOM Manipulation, Rendering)
  4. 2023.08.27 ↝ YouTube JS Engine Tamer ⇶ YouTube Page (JS Engine Optimization & Fix)
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. It leverages requestAnimationFrame for efficient task scheduling, aligning executions with the browser's rendering cycle.

- 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: Requires GPU acceleration; uses requestAnimationFrame for efficiency.
Note 3: Adjusts task frequency in background tabs to save energy.

Script Description

"YouTube CPU Tamer by AnimationFrame" 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.

Suggested Related Scripts

Full List here
If you are looking for the way to watch YouTube with least CPU resources in your old machine, please use YouTube Minimal on PC and YouTube Minimal Fixs

Further Reading - Timer Throttling

What Happens to setTimeout() / setInterval() Timers Running on Inactive Browser Tabs ?

Heavy throttling of chained JS timers beginning in Chrome 88

Sample Testing Links

Also see...