Don't throw it all away: Caching an immediate-mode UI

How Blick’s UI Painter keeps the pixels it has already rendered, combines shapes and opacity groups, and saves work behind an immediate-mode UI.

One common criticism of immediate-mode UI is that it repeats work. The application reconstructs its description of the interface each frame, even though much of the interface may be unchanged. The apparent tradeoff is simplicity of the programming model at the cost of repeated work.

I would like to show that this is not necessarily the case.

One straightforward rebuttal is that modern computers are really fast. If rebuilding the UI takes a millisecond at most, how much should we care?