DiffViewer Performance

Render a whole change set, one DiffViewer per file, while observing the first file on screen, the full render, long tasks, DOM size, heap, scroll frames, and collapse, expand and view switches.

Run metrics

200 files50,827 file lines0 diff linesunifiedhighlightedmounted on screen
Diff model (createDiffFile)—
First file on screen—
Full render—
Long tasks (count / total)—
DOM nodes—
Heap growth—
Scroll (fps / dropped / long tasks)—
Last interaction—
Full render runs from the commit to the next painted frame; first file on screen runs from the commit to the paint after a rendered diff first appears. A long task is a main-thread task over 50 ms; a dropped frame is a gap over 20 ms. A reading the browser cannot give (long tasks without the Long Tasks API, a heap reading that does not move) shows as a dash. Badges name the workload the run was measured on; the scroll and interaction readings name the view they were taken in. The scroll test moves the list from top to bottom over four seconds. With Mount on screen, a file renders only near the viewport: DOM size and heap cover what is on screen, full render is the paint the first files appear in, and scrolling includes mounting files. Mount all renders the whole change set at once, which can exhaust a phone's memory.