summarum/.jules/bolt.md
google-labs-jules[bot] 1dbcab67f5 perf: use DocumentFragment in renderDocList
Refactors renderDocList to use a DocumentFragment for batching element
insertions, preventing multiple reflows and repaints in the loop.

Co-authored-by: Horizontal42 <75383519+Horizontal42@users.noreply.github.com>
2026-07-08 09:14:15 +00:00

3 lines
424 B
Markdown

## 2024-07-08 - Use DocumentFragment to batch DOM inserts
**Learning:** Batching DOM insertions using DocumentFragment reduces repaints and layout recalculations. While the exact performance impact relies on environment details (e.g. vitest+jsdom drops time by ~25%), it's a standard and safe optimization for large loops.
**Action:** Apply DocumentFragment before loops that append many elements to a live DOM container.