Frontmatter
| id | 8576 |
| title | Investigate 'requestAnimationFrame' violations (55ms+) |
| state | Closed |
| labels | bugaiperformance |
| assignees | tobiu |
| createdAt | Jan 12, 2026, 4:09 AM |
| updatedAt | Jan 12, 2026, 5:53 AM |
| githubUrl | https://github.com/neomjs/neo/issues/8576 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 12, 2026, 5:53 AM |
Investigate 'requestAnimationFrame' violations (55ms+)

tobiu
Jan 12, 2026, 5:52 AM
Input from Gemini 3 Pro:
✦ I have implemented a Batching Strategy for
insertNodeoperations insrc/main/DeltaUpdates.mjs.The Solution: Contiguous
insertNodeoperations targeting the same parent are now grouped into a singleDocumentFragment. This batch is built in a detached state and inserted into the live DOM in a single atomic operation.Performance Impact:
- Reduced Reflows: Instead of 300+ individual insertions triggering layout calculations, we now have 1 reflow per batch.
- Stability: We experimented with "Time Slicing" (generators) but found that the overhead and complexity outweighed the benefits for the initial viewport render (which takes ~60ms synchronously). The "blank page" risk of async rendering was deemed too high.
- Result: The "slow operation" warning for large lists (e.g., 300 items) is now contained to ~40ms, which is within acceptable limits for a synchronous main thread operation.
Status:
- Time-slicing logic has been reverted.
- Performance logging has been removed.
- Batching logic is active and verified.
Ready for final review.
tobiu assigned to @tobiu on Jan 12, 2026, 5:53 AM
tobiu closed this issue on Jan 12, 2026, 5:53 AM
Issue: Following recent core changes, the console is reporting
[Violation] 'requestAnimationFrame' handler took 55ms. This indicates a regression in the main thread's rendering performance.Goal:
src/Main.mjsandsrc/main/DeltaUpdates.mjsto identify bottlenecks.console.time/timeEndorperformance.now()) to isolate the slow operations.