Closed josh83abc closed 2 years ago
Ok I found the issue. In the Activity Monitor I found out that the final app built with electron-build takes 50% more CPU/GPU than the electron dev app. And then I noticed that the final app is for Intel CPU and the electon dev app is for Apple Silicon!
Ok I built the app with "arm64", no freezes anymore! I assume Rosetta was compiling code on demand during user interactions. Electron works really well, well done guys!
Nice investigative work! Sounds like this can be closed then.
Note: You can also build with arch: 'universal'
to get one universal app (intel+apple)
Hello guys!
Short story : here is a video showing the issue : https://www.youtube.com/watch?v=HfeMcvrw1gY (big freezes at 1:06 and 1:08 and 1:16)
Long story : I am the developer of a popular music webapp (https://you.dj). I have issues with my electron version, once it is built with electron-builder (yarn dist) it feels less responsive/slower and I have random freezes (of 0.5-1sec usually), especially after mouse clicks or during mouse dragging. This freezes doesn't happen when I launch the app with "yarn start" or with the web version! I tried to diagnose the issue with the dev console performance tool but it crashes the app when I use it on the electron-built version. What is happening? Thanks a lot for your help!!!
You can try yourself both versions :
I am on MacOS Big Sur 1.5.2, Apple M1
My package.json : { "name": "YOUDJ", "productName": "YOUDJ DESKTOP", "version": "11.1.0", "description": "YouDJ Desktop App", "main": "src/main/main.js", "license": "SEE LICENSE IN license.txt", "scripts": { "start": "electron .", "compile": "electron-webpack", "dist": "yarn compile && electron-builder" }, "keywords": ["music","player","mix","dj","free"], "author": "YouDJ", "dependencies": { "source-map-support": "^0.5.16" }, "devDependencies": { "electron": "^16.0.7", "electron-builder": "^22.4.1", "electron-webpack": "^2.8.2", "webpack": "~4.42.1" }, "build": { "appId": "you.dj", "productName": "YOUDJ DESKTOP", "copyright": "Copyright YouDJ", "directories": {"buildResources": "build"}, "files": ["build", "src"], "asarUnpack": "src/helper" } }