perf(electrobun): JS blink replaces CSS animation, 1.13% CPU (was 6.5%)
JS setInterval(500ms) toggles .blink-off class instead of CSS @keyframes. WebKitGTK handles discrete class toggle efficiently (single repaint per toggle). 0.7% idle + 0.43% blink overhead = 1.13% total. Comparison: - CSS @keyframes: 6.5% (continuous compositor animation) - JS class toggle: 1.13% (2 repaints/sec) - No animation: 0.7% (baseline) - Tauri (CSS): ~0% (browser compositor optimized) - GPUI (custom Element): 2.17%
This commit is contained in:
parent
6b4a2494b3
commit
b79fbf688e
7 changed files with 31 additions and 16 deletions
|
|
@ -204,7 +204,11 @@ html, body {
|
|||
|
||||
.status-dot.running {
|
||||
--dot-color: var(--ctp-green);
|
||||
/* animation: pulse-dot 2s ease-in-out infinite; DISABLED for CPU test */
|
||||
/* No CSS animation — JS timer toggles .blink-off class instead */
|
||||
}
|
||||
|
||||
.status-dot.blink-off {
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.status-dot.idle {
|
||||
|
|
@ -213,7 +217,6 @@ html, body {
|
|||
|
||||
.status-dot.stalled {
|
||||
--dot-color: var(--ctp-peach);
|
||||
/* animation: pulse-dot 1.4s ease-in-out infinite; DISABLED for CPU test */
|
||||
}
|
||||
|
||||
@keyframes pulse-dot {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue