Skip to content

feat(gpu): add Chromium GPU memory flags to reduce VRAM usage#4368

Merged
gregpriday merged 2 commits intodevelopfrom
feature/issue-4365-add-chromium-gpu-memory-flags
Mar 28, 2026
Merged

feat(gpu): add Chromium GPU memory flags to reduce VRAM usage#4368
gregpriday merged 2 commits intodevelopfrom
feature/issue-4365-add-chromium-gpu-memory-flags

Conversation

@gregpriday
Copy link
Copy Markdown
Collaborator

Summary

  • Adds --force-gpu-mem-available-mb=512 and --gpu-rasterization-msaa-sample-count=0 Chromium switches to cap VRAM allocation and reduce per-context memory footprint
  • Flags are appended in electron/setup/environment.ts alongside existing process priority switches, before the app ready event
  • Adds unit tests covering both new flags and verifying existing switches remain intact

Resolves #4365

Changes

  • electron/setup/environment.ts — two new app.commandLine.appendSwitch calls for GPU memory constraints
  • electron/setup/__tests__/environment.test.ts — new test file with coverage for all GPU memory flags

Testing

Unit tests added and passing. Flags are safe at 512 MB (well above the ~384 MB threshold where WebGL would fall back to software rasterization). Relates to the broader memory reduction initiative in #4141.

- Add .tmp directory to .gitignore to exclude temporary files from version control
- Add force-gpu-mem-available-mb=512 to cap compositor tile memory budget
- Add gpu-rasterization-msaa-sample-count=0 to disable MSAA
- Add unit tests for both flags in environment.test.ts

Closes #4365
@gregpriday gregpriday merged commit 689b2ef into develop Mar 28, 2026
4 checks passed
@gregpriday gregpriday deleted the feature/issue-4365-add-chromium-gpu-memory-flags branch March 28, 2026 11:14
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.

Add Chromium GPU memory flags to reduce VRAM usage

1 participant