feat(gpu): add Chromium GPU memory flags to reduce VRAM usage#4368
Merged
gregpriday merged 2 commits intodevelopfrom Mar 28, 2026
Merged
feat(gpu): add Chromium GPU memory flags to reduce VRAM usage#4368gregpriday merged 2 commits intodevelopfrom
gregpriday merged 2 commits intodevelopfrom
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--force-gpu-mem-available-mb=512and--gpu-rasterization-msaa-sample-count=0Chromium switches to cap VRAM allocation and reduce per-context memory footprintelectron/setup/environment.tsalongside existing process priority switches, before the appreadyeventResolves #4365
Changes
electron/setup/environment.ts— two newapp.commandLine.appendSwitchcalls for GPU memory constraintselectron/setup/__tests__/environment.test.ts— new test file with coverage for all GPU memory flagsTesting
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.