Files
figcraft/docs
elliotttate be04080442 perf(render): pages of a large image-heavy file stop decoding their images again on every zoom (#2955)
The decoded-image cache held 256 copies whatever their size, fewer than one
page of such a file shows, so a render dropped copies it needed again. Image
adjustments ran per pixel at full size after every decode, and a copy at a new
size, or a shadow's opacity check, decoded the image again.

- The cache holds up to 4096 copies within its unchanged 512 MB budget.
- Adjustments are looked up in a table of the colours an image has met (the
  same results).
- A canvas copy at a smaller size is averaged down from a larger cached copy;
  exports reuse only the full decode, so their pixels are unchanged.
- An image's opacity is remembered with its full size after one look.

Tests: image_reuse_tests; timings: real_file_bench_tests (FIGCRAFT_BENCH_FILE).
2026-12-02 16:26:57 -05:00
..
2026-12-02 00:45:32 +07:00