-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfix-performance.bat
More file actions
27 lines (23 loc) · 889 Bytes
/
fix-performance.bat
File metadata and controls
27 lines (23 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
@echo off
echo ========================================
echo Performance Fix for Electron
echo ========================================
echo.
echo This will:
echo 1. Enable GPU acceleration
echo 2. Set to LOW performance mode
echo 3. Rebuild the app
echo.
pause
echo.
echo Step 1: Enabling GPU...
powershell -Command "(gc electron\main.js) -replace 'app.disableHardwareAcceleration\(\);', '// app.disableHardwareAcceleration();' | Out-File -encoding ASCII electron\main.js"
echo Step 2: Setting LOW performance mode...
powershell -Command "(gc src\js\config\electronConfig.js) -replace 'PERFORMANCE_MODES.MEDIUM', 'PERFORMANCE_MODES.LOW' | Out-File -encoding ASCII src\js\config\electronConfig.js"
echo Step 3: Rebuilding...
call npm run build
echo.
echo ========================================
echo Done! Now run: npm run electron
echo ========================================
pause