mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-27 13:29:15 +07:00
⚡️ perf: improve memory usage in desktop (#8431)
* improve usage of memory * try to improve
This commit is contained in:
@@ -36,7 +36,7 @@ export const appBrowsers = {
|
||||
autoHideMenuBar: true,
|
||||
height: 800,
|
||||
identifier: 'settings',
|
||||
keepAlive: true,
|
||||
// keepAlive: true,
|
||||
minWidth: 600,
|
||||
parentIdentifier: 'chat',
|
||||
path: '/settings',
|
||||
|
||||
@@ -128,9 +128,12 @@ export default class BrowserManager {
|
||||
*/
|
||||
initializeBrowsers() {
|
||||
logger.info('Initializing all browsers');
|
||||
Object.values(appBrowsers).forEach((browser) => {
|
||||
Object.values(appBrowsers).forEach((browser: BrowserWindowOpts) => {
|
||||
logger.debug(`Initializing browser: ${browser.identifier}`);
|
||||
this.retrieveOrInitialize(browser);
|
||||
|
||||
if (browser.keepAlive) {
|
||||
this.retrieveOrInitialize(browser);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user