Frontmatter
| id | 8790 |
| title | Refactor Portal Canvases to optimize animation loop |
| state | Closed |
| labels | airefactoringperformance |
| assignees | tobiu |
| createdAt | Jan 19, 2026, 1:10 AM |
| updatedAt | Jan 19, 2026, 1:14 AM |
| githubUrl | https://github.com/neomjs/neo/issues/8790 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 19, 2026, 1:14 AM |
Refactor Portal Canvases to optimize animation loop
tobiu assigned to @tobiu on Jan 19, 2026, 1:14 AM

tobiu
Jan 19, 2026, 1:14 AM
Input from Gemini 3 Pro:
✦ I have refactored
HeaderCanvas.mjs,HomeCanvas.mjs, andServicesCanvas.mjsto optimize the animation loop pattern.Changes:
- Performance: Removed
animationId_from the reactivestatic config. It is now a standard class field, preventing the overhead ofafterSethooks triggering on every frame (60fps).- Stability: Updated
initGraph()in all three canvases to check!me.animationIdbefore starting the render loop. This prevents accidental "Zombie Loops" (duplicate render loops running in parallel) ifinitGraphis called multiple times.- Cleanup: Removed the now-redundant
afterSetAnimationIdmethods.The canvases now follow the stabilized pattern established in
TicketCanvas.mjs.
tobiu closed this issue on Jan 19, 2026, 1:14 AM
Apply the optimization pattern from
TicketCanvas.mjstoHeaderCanvas,HomeCanvas, andServicesCanvas.animationId_from reactive config to avoid overhead in the render loop.animationId.!me.animationIdcheck ininitGraphto prevent duplicate loops.clearGraphproperly resets the state.