Repository navigation
Description
I had a quite slow startup on windows so I made some benchmarks and found that most antivirus softwares are highly slowing startups on windows.
Also @romovs #1474 was probably due to this.
This happens at every startup, even on a app that have been cleanly installed with a signed installer.
I tested with an empty app (just start main crash reporter, open one empty window and start renderer crash reporter), on Windows 8.1 64bit, electron 0.25.1 x64.
Results:
Whithout any antivirus
Total startup time (from main thread start to ready event): **~ 150ms**
Details:
- Main thread start: instantaneous
- Main crash reporter: <20ms
- BrowserWindow creation and loading: ~ 100ms
- Browser crash reporter: <20ms
With avast 2015
Total startup time: >1500ms
Details:
- Main thread start: not instant but quick
- Main crash reporter: ~350-400ms
- BrowserWindow creation and loading: ~ 800ms
- Browser crash reporter: ~350-400ms
With Panda Free Antivirus
Total startup time: >7000ms
Details:
- Main thread start: ~1500-2000ms
- Main crash reporter: ~1000ms
- BrowserWindow creation and loading: ~ 3000ms
- Browser crash reporter: ~1000ms
I have not tested with more antiviruses but I think they all have the same sandbox / execution watcher features.
6s for an empty app startup is a real issue and I can't tell my users to disable their antiviruses to make my app boot normally.
I'll try to enquire more on what could cause such slowdown and are the usual solutions but I think that's a concern for all electron app (including atom)
- Is their a way to sign the app itself which would prevent this ?
- Is their some exclusion process or registration against antiviruses ?
- Is their a way to prevent this from happening at each startup ?
- Is there some operation in electron that should be done differently (or integrated differently regarding io.js) ?
- Is there some read/write pathes that are particularly watched by antiviruses ? (could be related to Cache directory on windows should be %localappdata% by default #1404)
Activity
CharlieHess commentedon Apr 24, 2015
We've definitely been noticing this with Slack. Some AV block our network traffic outright, resulting in blank white-screens and confounded users. The better vendors (AVG, Kaspersky) have false positive forms that you can fill out, typically linked from their Support page. Some of them are fascists and will ask that you reproduce the issue (requiring you to first pay for their product or install a trial) and send them the logs from an instance when the app is blocked (here's looking at you, Symantec).
When filing these whitelist requests, I've thus far included details about Electron / Squirrel and pointed out that these problems will apply to a number of other applications. So hopefully at some point we can reach a critical mass.
YurySolovyov commentedon Apr 25, 2015
How does plain Chrome / Chromium compare to that? If it doesn't get affected, then Electron does something wrong.
jvkassi commentedon Apr 26, 2015
Definitly right.

I think it's because of the application is from an "unknown publisher"
When you launch electron.exe even without AV, windows warn you with an elegant message.
The app "electron.exe" must be signed
ref: https://msdn.microsoft.com/en-us/library/windows/desktop/aa387764%28v=vs.85%29.aspx
anaisbetts commentedon Apr 26, 2015
This isn't necessarily true, AV software often just has flat-out whitelists - Chrome will naturally be in that list, and we won't
YurySolovyov commentedon Apr 26, 2015
sigining an app can be expensive, and I'm not sure it will help a lot, maybe there are trials for that, so we can test if there are any difference?
anaisbetts commentedon Apr 26, 2015
afaik Atom is already signed by GitHub, if you're building it yourself this might be a contributing factor
felicienfrancois commentedon Apr 27, 2015
Chrome seems not affected by antiviruses but:
I have just tested to sign the app with a valid authenticode certificate (GlobalSign) and there is no changes with panda antivirus (not tested with avast). I signed both .exe and .dll files.
Signing prevent from getting "Unknow publisher" warning and to pass smartscreen check but does not seems to be taken into account by antiviruses (or maybe when the certificate have been used to sign withelisted app ?)
atom executable is signed but not electron ones.
It's fine because signing may prevent developers from changing icons and metadata of the executable.
But DLLs from electron are not signed at all. DLLs should be signed too and I think it should be signed by electron.
zcbenz commentedon Jan 6, 2016
I'm closing this since there is nothing we can do on Electron's side.
fritx commentedon Jul 20, 2016
BrowserWindows are really slow on our Windows machines!
However, I wonder why NW.js doesn't have the same problem.
xland commentedon Jun 22, 2022
#32375