ELECTRON-136 (Disable auto reload feature for r51 release) (#366)

- Disable this feature for r51 release
- Remove commented code
This commit is contained in:
Kiran Niranjan 2018-05-10 22:47:06 +05:30 committed by Vishwas Shashidhar
parent 0f2d52020d
commit 31b62eaef2
4 changed files with 0 additions and 33 deletions

View File

@ -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:
}

View File

@ -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();
}
}
});

View File

@ -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',

View File

@ -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.