Files
vectorcraft/crates/render
dotCooCoo f14f4ad55c Render: the decoded-image cache can grow to a quarter of installed memory on every desktop OS
The renderers share decoded images within a budget that was 1 GiB on
every desktop OS: the installed memory was read only on Linux, and
there the budget was an eighth of it, at most 1 GiB. Images whose
decoded pixels add up to more than that were decoded again each time
the view moved from one image to another: 0.9 to 1.1 s for a
12000 x 9000 JPEG and 2.0 to 2.2 s for a 16384 x 16384 one on a
Ryzen 7 9800X3D.

The default budget is now a quarter of the installed memory, with no
fixed ceiling: GlobalMemoryStatusEx on Windows (through winsafe, which
vectorcraft-cli already uses), sysctl hw.memsize on macOS, hw.physmem
on FreeBSD and /proc/meminfo on Linux. It stays 1 GiB where the
memory can't be read and 256 MiB in the web build, and a 32-bit build
keeps at most a quarter of its address space.

Docs: docs/target-app-parity.md.
2026-10-25 22:18:12 -07:00
..