moved app options

This commit is contained in:
antelle 2020-05-12 23:46:19 +02:00
parent 20623e4c42
commit 8e4566fe5f
No known key found for this signature in database
GPG Key ID: 094A2F2D6136A4EE
1 changed files with 2 additions and 6 deletions

View File

@ -73,7 +73,6 @@ app.on('window-all-closed', () => {
app.on('ready', () => {
perfTimestamps?.push({ name: 'app on ready', ts: process.hrtime() });
appReady = true;
setAppOptions();
setSystemAppearance();
createMainWindow();
setGlobalShortcuts(appSettings);
@ -153,11 +152,6 @@ app.getMainWindow = function() {
};
app.setGlobalShortcuts = setGlobalShortcuts;
function setAppOptions() {
app.commandLine.appendSwitch('disable-background-timer-throttling');
perfTimestamps?.push({ name: 'setting app options', ts: process.hrtime() });
}
function readAppSettings() {
try {
return JSON.parse(fs.readFileSync(appSettingsFileName, 'utf8'));
@ -486,6 +480,8 @@ function setEnv() {
process.env.XDG_CURRENT_DESKTOP = 'Unity';
}
app.commandLine.appendSwitch('disable-background-timer-throttling');
// disable all caching, since we're not using old profile data anyway
app.commandLine.appendSwitch('disable-http-cache');
app.commandLine.appendSwitch('disable-gpu-shader-disk-cache');