Insights · Engineering
Drawing 100,000 schedule items without slowing down
Our first prototype drew every bar, milestone and label on the page. At 20,000 schedule items that meant about 131,000 page elements, and every zoom took most of a second. Version 0.5 changes the approach: draw only what's on screen.
The problem with drawing everything
A browser has to lay out, style and paint every element on a page, visible or not. A Gantt chart multiplies quickly: each item has a bar or marker, a label, often a date, and row backgrounds behind them. Double the schedule and you double the work for every interaction.
Viewport virtualisation
PhaseStride Gantt 0.5 still calculates the exact position of every row and label, because label placement depends on its neighbours. But it only creates page elements for the visible window, plus one screen's worth above and below for smooth scrolling. Scroll further and it redraws the next slice. The page now holds about 620 elements whether the schedule has 1,000 items or 100,000.
Caching the expensive part
Placing labels so they never collide is the most expensive calculation. We cache each row's result for recent zoom levels, so collapsing and expanding a group, or zooming back, doesn't repeat the work. When Power BI only resizes or restyles the visual, the data model is reused instead of rebuilt.
The results
| Items | Action | v0.4.1 | v0.5.0 |
|---|---|---|---|
| 20,000 | Load | 820 ms | 206 ms |
| 20,000 | Zoom | 687 ms | 26 ms |
| 20,000 | Expand all | 613 ms | 26 ms |
| 20,000 | Page elements | 130,983 | 620 |
| 100,000 | Zoom | 5,966 ms | 171 ms |
| 100,000 | Expand all | 7,213 ms | 40 ms |
Headless Chrome on Apple silicon, visual 1400 × 800 px, synthetic programme data. Power BI runs visuals in a sandboxed frame, often on slower laptops, so compare the relative change and expect different absolute times.
An honest limit
Power BI passes at most 30,000 rows to this visual, so the 100,000-item figures show headroom in the rendering engine, not what a report can display today. Detecting and loading larger datasets is on our roadmap.
Kept honest by tests
Every build runs performance budgets alongside the functional tests: load times by size, and a 300 ms ceiling for every interaction up to 20,000 items. A change that makes the chart slower fails the build.