소스 검색

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');