Skip to content

feat(perf): size the Preferences memory limits to the machine - #1598

Merged
marcinz606 merged 1 commit into
marcinz606:mainfrom
jondestoppeleire:feat/hardware-memory-budgets
Nov 5, 2026
Merged

marcinz606 merged 1 commit into
marcinz606:mainfrom
jondestoppeleire:feat/hardware-memory-budgets

Conversation

@jondestoppeleire

@jondestoppeleire jondestoppeleire commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The memory limits in Preferences are fixed numbers. They do not protect small machines, and they hold back large ones. An 8 GB machine can set a 32 GB cache with no warning. A 128 GB machine stops at a 32 GB cache and 16 HQ buffers. GPU texture cap stops at 16384 px, under the long edge of a 400 MP frame.

Change

Each cache row now shows a recommendation from the machine's RAM. The user can go past it, and the hint then turns amber with a warning icon. GPU texture cap goes higher and has no recommendation. Default values and the default HQ cap do not change, and no row has a lower limit than before.

Recommended value, with a 61 MP frame open at the default preview size:

Row Old limit 8 GB 32 GB 128 GB New limit
Preview cache limit 32768 MB 4096 MB 16384 MB 65536 MB Larger of old limit and all of RAM
Preview cache 64 photos 139 559 2236 Larger of old limit and all of RAM
HQ buffers 16 photos 2 10 40 Larger of old limit and all of RAM
Rendered frames 64 frames 104 419 1677 Larger of old limit and all of RAM
GPU texture cap 16384 px — — — 65536 px

Why this shape

A recommendation is half of RAM, or how many entries of that row's size fit in that half, so it needs no GPU types or machine tiers. A user who goes past a recommendation can run out of memory, and the amber hint is the only protection.

Testing

  • The real app ran on one 128 GB Apple Silicon machine with a 61 MP ARW. At the default it loads at 6144 px, and with GPU texture cap at 16384 it loads whole. Nothing has run on a low-memory machine or a discrete GPU.
  • Unit tests pass RAM in, so they do not depend on the test machine.
  • The new strings in de, ja, ko, vi and zh_CN are mine, and no native speaker has checked them.

CI failures not from this PR

  • Test and Lint: tests/test_i18n.py::test_catalog_covers_every_marked_message_and_preserves_formats[vi] also fails on main at e22f98e4. vi.json lacks 39 strings from the roll work on main, and none of them come from this PR. It is the only failure in this job, and this job goes green when main has those strings and this PR is rebased.
  • Native (macos-15): GitHub cancelled this job after 15 minutes, with no steps and no log. It passes on main, so it needs a re-run. A re-run needs admin rights on this repository.

🤖 Generated with Claude Code

@jondestoppeleire
jondestoppeleire force-pushed the feat/hardware-memory-budgets branch 4 times, most recently from a671339 to 81e40ff Compare November 4, 2026 17:19
@jondestoppeleire jondestoppeleire changed the title feat(perf): size the HQ cap and the Preferences memory rows to the machine feat(perf): size the Preferences memory limits to the machine Nov 4, 2026
@jondestoppeleire
jondestoppeleire force-pushed the feat/hardware-memory-budgets branch 3 times, most recently from 58d4e3e to 0875bdf Compare November 4, 2026 18:02
The memory limits in Preferences are fixed numbers. An 8 GB machine can set a
32 GB cache with no warning, and a 128 GB machine stops at a 32 GB cache and 16 HQ
buffers.

Each cache row now shows a recommendation of half of the machine's RAM, or how
many entries of that row's size fit in that half. The user can go past it, and the
hint then turns amber. A row stops at its old limit or all of RAM, whichever is
larger. GPU texture cap goes to 65536 px, past the long edge of a 400 MP frame, with
no recommendation. Default values and the default HQ cap do not change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jondestoppeleire
jondestoppeleire force-pushed the feat/hardware-memory-budgets branch from 0875bdf to 6a5495f Compare November 5, 2026 04:11
@marcinz606
marcinz606 merged commit 8586351 into marcinz606:main Nov 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants