浏览代码

fix(electron): 移除disableHardwareAcceleration和disableGpu标志,避免首次加载慢

ethanfly 3 天之前
父节点
当前提交
5a8f40462a
共有 1 个文件被更改,包括 0 次插入5 次删除
  1. 0 5
      client/electron/main.ts

+ 0 - 5
client/electron/main.ts

@@ -306,13 +306,8 @@ if (!gotTheLock) {
   });
 
   // ========== 降低 Electron 内存占用(必须在 app.whenReady 之前) ==========
-  app.disableHardwareAcceleration();
   app.commandLine.appendSwitch('js-flags', '--max-old-space-size=512');
-  app.commandLine.appendSwitch('disable-gpu');
-  app.commandLine.appendSwitch('disable-software-rasterizer');
   app.commandLine.appendSwitch('renderer-process-limit', '2');
-  app.commandLine.appendSwitch('disable-backgrounding-occluded-windows');
-  app.commandLine.appendSwitch('disable-renderer-backgrounding');
 
   app.whenReady().then(async () => {
     logMemory('AppReady');