Frontmatter
| id | 8559 |
| title | Optimize TimelineCanvas data load delay |
| state | Closed |
| labels | enhancementaiperformance |
| assignees | tobiu |
| createdAt | Jan 11, 2026, 11:39 PM |
| updatedAt | Jan 11, 2026, 11:42 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8559 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 8398 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 11, 2026, 11:42 PM |
Optimize TimelineCanvas data load delay
tobiu assigned to @tobiu on Jan 11, 2026, 11:41 PM

tobiu
Jan 11, 2026, 11:41 PM
Input from Gemini 3 Pro:
✦ I have optimized the
onTimelineDataLoadmethod inTimelineCanvas.mjs.Changes:
- Removed the fixed 50ms/100ms delay for the initial attempt.
- The logic now attempts to calculate positions immediately (0ms delay) on the first try (
attempt === 0).- If the DOM is not ready (nodes not found), the existing retry logic kicks in with a 50ms backoff for subsequent attempts.
This change ensures that navigation between tickets (where the DOM is often already ready or updates are fast) feels instant, while maintaining robustness for slower DOM updates.
tobiu added parent issue #8398 on Jan 11, 2026, 11:42 PM
tobiu closed this issue on Jan 11, 2026, 11:42 PM
The current implementation of
TimelineCanvas.onTimelineDataLoadintroduces a fixed delay (50ms for resize, 100ms for load) to wait for DOM updates before calculating node positions. This delay is unnecessary when the DOM is already ready (e.g., navigating between tickets where the list structure persists).This ticket tracks the optimization to remove the initial delay for the first attempt, relying on the existing retry mechanism with a backoff delay for subsequent attempts if the DOM is not yet ready.
Proposed Change: Change:
let delay = isResize ? 50 : 100;To:
let delay = attempt === 0 ? 0 : 50;This ensures instant updates when possible while maintaining robustness for async DOM updates.