Enhance X.com/Twitter performance by removing heavy CSS, throttling FPS, limiting feed DOM, blocking analytics, and optimizing offscreen videos.
X.com Heavy JS Optimizer+ is a high-performance userscript that dramatically reduces lag, scroll jank, and CPU load on X.com (Twitter).
It intelligently removes redundant animations, limits repainting, pauses offscreen videos, and caps JavaScript frame rates тАФ all without breaking the core site experience.
ЁЯз╣ Lightweight CSS Cleanup
Removes heavy effects (backdrop-filter, blur, gradients) and disables GPU-stressing layers.
тЪЩя╕П Passive Event Optimization
Forces passive: true on scroll/touch listeners for smoother rendering.
ЁЯОЮя╕П Smart Video Control
тАв Only one video can play at a time
тАв Auto-pause when scrolled offscreen
тАв Prevents auto-play and decoding spam
ЁЯзй DOM Feed Garbage Collector
Keeps only the last N tweets in the DOM to prevent memory bloat.
(Configurable from userscript menu.)
ЁЯУК Metrics Blocking (Optional)
Blocks unnecessary telemetry calls like scribe, engagement, and client_event.
тЪб Aggressive Runtime Mode
Auto-detects long tasks and dynamically limits FPS (requestAnimationFrame) to maintain stability.
ЁЯТд Tab Visibility Safety
Auto-pauses all videos when tab is hidden.
Available via ViolentMonkey / TamperMonkey menu:
| Scenario | Before | After | Improvement |
|---|---|---|---|
| Scrolling feed 100+ tweets | ~48тАУ55 FPS | 90+ FPS | +85% |
| Memory footprint (avg) | 1.4 GB | 650 MB | тИТ53% |
| CPU load (video active) | 45тАУ60% | 25тАУ30% | тИТ50% |
(Tested on Brave 1.72 / Win10 / Ryzen 7 5800H)
тЬЕ Works on:
ЁЯзй Supported managers:
Developed by Oppai1442
Made with тЭдя╕П, caffeine, and a stubborn hatred of lag.
License: MIT
View source on GreasyFork
тЪая╕П Disclaimer:
This script modifies rendering behavior for optimization purposes.
Use at your own discretion тАФ functionality on experimental browsers may vary.