[CmdSwitches] Simplify presets into perf,battery
This commit is contained in:
parent
9bb1946e2a
commit
07058a6455
1 changed files with 3 additions and 10 deletions
|
@ -1,16 +1,9 @@
|
||||||
const { app } = require('electron');
|
const { app } = require('electron');
|
||||||
|
|
||||||
const presets = {
|
const presets = {
|
||||||
'perf': `--enable-gpu-rasterization --enable-zero-copy --ignore-gpu-blocklist --enable-hardware-overlays=single-fullscreen,single-on-top,underlay --enable-features=BackForwardCache:TimeToLiveInBackForwardCacheInSeconds/300/should_ignore_blocklists/true/enable_same_site/true,ThrottleDisplayNoneAndVisibilityHiddenCrossOriginIframes,UseSkiaRenderer,WebAssemblyLazyCompilation --disable-features=Vulkan`, // Performance
|
'perf': `--enable-gpu-rasterization --enable-zero-copy --ignore-gpu-blocklist --enable-hardware-overlays=single-fullscreen,single-on-top,underlay --enable-features=EnableDrDc,CanvasOopRasterization,BackForwardCache:TimeToLiveInBackForwardCacheInSeconds/300/should_ignore_blocklists/true/enable_same_site/true,ThrottleDisplayNoneAndVisibilityHiddenCrossOriginIframes,UseSkiaRenderer,WebAssemblyLazyCompilation --disable-features=Vulkan --force_high_performance_gpu --enable-quic`, // Performance
|
||||||
'perf-ex': '--enable-quic --enable-features=EnableDrDc,CanvasOopRasterization', // Performance experimental (not known / tested benefit)
|
|
||||||
'perf-ex2': 'auto-detect=false no-proxy-server', // Does this do anything past electron 3.0.1 ? - include as a preset because why not
|
|
||||||
'perf-ex3': '--force_high_performance_gpu', // Seems to fix lagging for some people using "perf"?
|
|
||||||
'memory-ex': '--process-per-site --renderer-process-limit=2', // "Reducing" memory usage (rough / unknown results)
|
|
||||||
'memory-ex2': '--process-per-tab',
|
|
||||||
'debug': '--show-fps-counter', // Debugging tools
|
|
||||||
'disablemediakeys': '--disable-features=HardwareMediaKeyHandling', // Disables media keys (common want?)
|
'disablemediakeys': '--disable-features=HardwareMediaKeyHandling', // Disables media keys (common want?)
|
||||||
'battery': '--enable-features=TurnOffStreamingMediaCachingOnBattery', // Known to have better battery life for Chromium?
|
'battery': '--enable-features=TurnOffStreamingMediaCachingOnBattery --force_low_power_gpu' // Known to have better battery life for Chromium?
|
||||||
'battery-tradeoff': '--force_low_power_gpu' // Improves battery life but with perf tradeoffs?
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const combinePresets = (keys) => {
|
const combinePresets = (keys) => {
|
||||||
|
@ -34,7 +27,7 @@ const combinePresets = (keys) => {
|
||||||
|
|
||||||
|
|
||||||
module.exports = () => {
|
module.exports = () => {
|
||||||
const preset = oaConfig.cmdPreset || 'perf,perf-ex,perf-ex3,battery'; // Default to most (should default to none?) // 'perf,perf-ex,perf-ex2,battery,memory-ex2'
|
const preset = oaConfig.cmdPreset || 'perf'; // Default to most (should default to none?) // 'perf,perf-ex,perf-ex2,battery,memory-ex2'
|
||||||
let cmdSwitches = presets[preset] || ''; // Default to blank (no switches)
|
let cmdSwitches = presets[preset] || ''; // Default to blank (no switches)
|
||||||
|
|
||||||
log('CmdSwitches', 'Preset:', preset);
|
log('CmdSwitches', 'Preset:', preset);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue