Frontmatter
| id | 8719 |
| title | Refactor ServicesCanvas.mjs for Zero-Allocation & Architecture |
| state | Closed |
| labels | airefactoringperformance |
| assignees | tobiu |
| createdAt | Jan 16, 2026, 6:40 PM |
| updatedAt | Jan 16, 2026, 6:43 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8719 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 16, 2026, 6:43 PM |
Refactor ServicesCanvas.mjs for Zero-Allocation & Architecture
tobiu assigned to @tobiu on Jan 16, 2026, 6:43 PM

tobiu
Jan 16, 2026, 6:43 PM
Input from Gemini 3 Pro:
✦ I have completed the refactoring of
ServicesCanvas.mjs.Changes:
- Zero Allocation Projection: Replaced
getProjection(which created closures and objects per frame) withupdateProjectionand a reusableprojectionPointobject.- Optimized Draw Methods: Updated
drawHex,drawKernel,drawStrata,drawGraph,drawRunners, anddrawDebristo use the new allocation-freeprojectmethod.- Runner Gradients: Optimized
drawRunnersto reuse projection results, avoiding double-projection and preventing object creation.The render loop now operates with significantly reduced GC pressure.
tobiu closed this issue on Jan 16, 2026, 6:43 PM
The
ServicesCanvas.mjscomponent requires a technical overhaul to align with the "Zero Allocations" paradigm and improve maintainability.Goals:
getProjectionto avoid creating closures and objects per frame.project()to write to a shared/reusable mutable object instead of returning new objects for every vertex.findNeighborsto avoid creating arrays in the render loop.