perf(electrobun): fix CEF high CPU — disable GPU flags + remove CSS animations
- electrobun.config.ts: add --disable-gpu --disable-gpu-compositing to CEF flags (GLXBadWindow X11 errors cause continuous recovery loop) - StatusBar.svelte: replace @keyframes pulse with CSS transition + JS toggle - app.css: remove @keyframes pulse-dot (continuous compositor repaint) CSS animations on small elements cause 10-30% CPU in both CEF and WebKitGTK. JS class toggle with transition: opacity 0.3s uses near-zero CPU.
This commit is contained in:
parent
b83845a78f
commit
3a61158e00
3 changed files with 15 additions and 11 deletions
|
|
@ -178,13 +178,11 @@
|
|||
.dot.orange { background: var(--ctp-peach); }
|
||||
|
||||
.pulse-dot {
|
||||
animation: pulse 1.5s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0%, 100% { opacity: 1; }
|
||||
50% { opacity: 0.3; }
|
||||
/* No CSS animation — use JS class toggle to avoid continuous repaint.
|
||||
CEF + WebKitGTK both suffer from high CPU with @keyframes on small elements. */
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
.pulse-dot.dim { opacity: 0.4; }
|
||||
|
||||
.val { color: var(--ctp-text); font-weight: 500; }
|
||||
.cost { color: var(--ctp-yellow); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue