zara-avatar: stop idle Electron renderer CPU burn and gate it in CI #83

Closed
opened 2026-09-08 02:02:56 +00:00 by nsaspy · 0 comments
Owner

Observed on Linux/NixOS: the installed zara-avatar Electron renderer (~/.local/share/zara/renderer/node_modules/electron/dist/electron) can consume ~100% of one CPU core. Killing Zara dropped whole-system CPU/load from roughly 20%+ to ~4%, strongly isolating the renderer as the culprit.

Current renderer code starts THREE.WebGLRenderer.setAnimationLoop(() => update()) unconditionally, including while the BrowserWindow is hidden and while no avatar is loaded.

Acceptance:

  • hidden renderer with no avatar does not continuously render;
  • visible renderer with no avatar does not continuously render;
  • showing a loaded avatar resumes animation; hiding/minimizing pauses it; restoring/showing resumes without a huge time-step;
  • CI launches the real Electron renderer under Xvfb, samples the entire Electron process tree through Linux /proc, and fails on sustained idle CPU regression;
  • CPU measurements are uploaded as CI artifacts;
  • existing plugin/registry checks remain green.
Observed on Linux/NixOS: the installed zara-avatar Electron renderer (`~/.local/share/zara/renderer/node_modules/electron/dist/electron`) can consume ~100% of one CPU core. Killing Zara dropped whole-system CPU/load from roughly 20%+ to ~4%, strongly isolating the renderer as the culprit. Current renderer code starts `THREE.WebGLRenderer.setAnimationLoop(() => update())` unconditionally, including while the BrowserWindow is hidden and while no avatar is loaded. Acceptance: - hidden renderer with no avatar does not continuously render; - visible renderer with no avatar does not continuously render; - showing a loaded avatar resumes animation; hiding/minimizing pauses it; restoring/showing resumes without a huge time-step; - CI launches the real Electron renderer under Xvfb, samples the entire Electron process tree through Linux `/proc`, and fails on sustained idle CPU regression; - CPU measurements are uploaded as CI artifacts; - existing plugin/registry checks remain green.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/zara-plugins#83
No description provided.