Startup profile
Visible pages are created first, so the initial render avoids the huge parse cost of shipping every template in the original document.
Demo 4
This page creates only the first visible template pages immediately, then fills the rest of the inert template cache in background batches to improve startup responsiveness.
Visible pages are generated immediately. Remaining templates are created incrementally with idle/frame-sized work.
The hidden #template-bank fills gradually as background work creates more inert page templates.
Loading template overview...
Visible pages are created first, so the initial render avoids the huge parse cost of shipping every template in the original document.
Additional template pages are built in small batches with idle or frame-sized scheduling. The page keeps improving its cache while remaining interactive.
This keeps the template model, but it still eventually creates many DOM fragments. It spreads work over time instead of paying everything up front.