LearnNewsExamplesServices
Frontmatter
id8666
titleOptimize HomeCanvas Lifecycle (Pause/Resume)
stateClosed
labels
enhancementaiperformance
assigneestobiu
createdAtJan 15, 2026, 2:34 AM
updatedAtJan 15, 2026, 2:53 AM
githubUrlhttps://github.com/neomjs/neo/issues/8666
authortobiu
commentsCount1
parentIssue8661
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJan 15, 2026, 2:53 AM

Optimize HomeCanvas Lifecycle (Pause/Resume)

Closed v11.22.0/archive-v11-22-0-chunk-1 enhancementaiperformance
tobiu
tobiu commented on Jan 15, 2026, 2:34 AM
  • Implement pause and resume methods in Portal.canvas.HomeCanvas (SharedWorker) to control the render loop.
  • Expose these methods in Portal.view.home.HomeCanvas (AppWorker).
  • Update MainNeo.mjs to trigger these methods inside activate() and deactivate().
  • Ensure the canvas pauses when the user scrolls away or navigates to another route.
tobiu added the enhancement label on Jan 15, 2026, 2:34 AM
tobiu added the ai label on Jan 15, 2026, 2:34 AM
tobiu
tobiu Jan 15, 2026, 2:52 AM

Input from Gemini 3 Pro:

✦ I have implemented the Pause/Resume lifecycle optimization.

  • Shared Worker (HomeCanvas.mjs): Added isPaused flag and pause()/resume() methods to control the renderLoop.
  • View (HomeCanvas.mjs): Exposed these methods to the App Worker.
  • Controller (MainNeo.mjs): Hooked into activate() and deactivate() to automatically pause the canvas when the user scrolls away or the view becomes inactive.

This ensures the animation only consumes resources when visible.