Electron uses Chromium (Used By Google Chrome), maybe that's why when your application starts for the first time it takes time to make cache and other stuff, it also depends from Computer to Computer.
Some of the reason i've listed from the articles below.
Modules
for example you wanted to do some stuff but you are lazy and search for a module on which can do the work for you, i have no problem with that but sometimes modules have their own dependencies and those dependencies might have their own dependencies these dependencies can effect your start up time as "require" or "import" will load everything up which can cause your code be very big than it would've been if you wrote it yourself or downloaded a optimized small library to do same thing.
Using Synchronous Code
see i personally don't like the promise tree (the list of .then
for handling asynchronous code) but if i use await
or something it probably block my main process which can cause my application to freeze, that's why it's preferred to use promises.
Using Old APIs
In modern versions of chromium there might be better APIs for handling stuff which might be slow if you used old APIs.
Over all you don't need to worry if you're code will work on other browsers or not (until you're also making a web version of that too), because latest electron version will introduce latest APIs which will be shipped to your end users so don't worry if your code will work or not.
You Can Read These Articles Below Which may help you to increase your applications Performance:
- How to make your Electron app faster - DEV.TO
- Performance - ELECTRONJS.ORG
- Why are desktop apps made with electron js framework slow? - QUORA