mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-29 02:11:28 -06:00
ELECTRON-136 (Disable auto reload feature for r51 release) (#366)
- Disable this feature for r51 release - Remove commented code
This commit is contained in:
parent
0f2d52020d
commit
31b62eaef2
@ -17,7 +17,6 @@ const { bringToFront } = require('./bringToFront.js');
|
||||
const eventEmitter = require('./eventEmitter');
|
||||
const { isMac } = require('./utils/misc');
|
||||
const { openScreenPickerWindow } = require('./desktopCapturer');
|
||||
const { optimizeMemory } = require('./memoryMonitor');
|
||||
|
||||
const apiEnums = require('./enums/api.js');
|
||||
const apiCmds = apiEnums.cmds;
|
||||
@ -148,11 +147,6 @@ electron.ipcMain.on(apiName, (event, arg) => {
|
||||
windowMgr.getMenu().popup(browserWin, { x: 20, y: 15, async: true });
|
||||
}
|
||||
break;
|
||||
case apiCmds.optimizeMemoryConsumption:
|
||||
if (typeof arg.memory === 'object' && typeof arg.memory.workingSetSize === 'number') {
|
||||
optimizeMemory(arg.memory);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
|
@ -45,10 +45,8 @@ function optimizeMemory(memoryInfo) {
|
||||
const mainWindow = getMainWindow();
|
||||
|
||||
if (mainWindow && !mainWindow.isDestroyed()) {
|
||||
setIsAutoReload(true);
|
||||
reloadedTimeStamp = new Date().getTime();
|
||||
log.send(logLevels.INFO, 'Reloading the app to optimize memory usage');
|
||||
mainWindow.webContents.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -326,22 +326,6 @@ function getTemplate(app) {
|
||||
}
|
||||
});
|
||||
|
||||
// Window/View menu -> separator
|
||||
template[index].submenu.push({
|
||||
type: 'separator',
|
||||
});
|
||||
|
||||
// Window - View menu -> memoryRefresh
|
||||
template[index].submenu.push({
|
||||
label: 'Refresh app when idle',
|
||||
type: 'checkbox',
|
||||
checked: memoryRefresh,
|
||||
click: function(item) {
|
||||
memoryRefresh = item.checked;
|
||||
updateConfigField('memoryRefresh', memoryRefresh);
|
||||
}
|
||||
});
|
||||
|
||||
if (!isMac) {
|
||||
template[index].submenu.push({
|
||||
label: 'Quit Symphony',
|
||||
|
@ -64,15 +64,6 @@ const throttledSetBadgeCount = throttle(1000, function(count) {
|
||||
});
|
||||
});
|
||||
|
||||
// Gathers renderer process memory
|
||||
setInterval(() => {
|
||||
const memory = process.getProcessMemoryInfo();
|
||||
local.ipcRenderer.send(apiName, {
|
||||
cmd: apiCmds.optimizeMemoryConsumption,
|
||||
memory: memory
|
||||
});
|
||||
}, 1000 * 60 * 4);
|
||||
|
||||
createAPI();
|
||||
|
||||
// creates API exposed from electron.
|
||||
|
Loading…
Reference in New Issue
Block a user