17

Context

I have setup a trivial Electron app which shows a plain html file and it consistently takes more than two seconds to start up. The key performance measurements are:

  • 170 ms: a blank window appears on the screen
  • 2800 ms: the window shows the specified HTML

After asking about it, I discovered that the problem is caused by Windows Defender. Disabling its real-time protection gets us an acceptable startup speed:

  • 150 ms: a blank window appears on the screen
  • 500 ms: the window shows the specified HTML

While this speedup solves the problem completely, it is a no-go to ask users to disable Windows Defender in order to have faster startup.

Question

I have observed some popular Electron apps, like Visual Studio Code, have normal startup time so I assume there is a way to achieve that without disabling Windows Defender. The question is: how?

The only thing that comes to my mind is signing the electron binary, in the hope that it solves the problem. But since a signing certificate costs money I'd rather be sure I need it before going down this route. It would be great if someone with experience on this area could chime in!

Requirement

I am looking for a solution that doesn't require telling my users to modify their environment.

Soleil
  • 6,404
  • 5
  • 41
  • 61
aochagavia
  • 5,887
  • 5
  • 34
  • 53
  • 2
    The only experience I have is that Windows Defender pretty much slows everything down. Pretty much any 3rd party application takes a few seconds to show up, and I can hear my computer's fan get louder while I wait. Just an awesome experience all around :/ –  Jun 15 '21 at 08:13
  • @jqueryHtmlCSS Thanks for the suggestion! Unfortunately it won't cut it in this case, because I am looking for a solution that doesn't require telling my users to modify their environment – aochagavia Jun 21 '21 at 08:30
  • 1
    I'd also suggest creating a Github issue in the Electron repo: https://github.com/electron/electron – Joshua Jun 26 '21 at 08:32
  • @Joshua thanks for the suggestion! I found an issue from a few days ago describing a problem similar to my own, so I commented there (see https://github.com/electron/electron/issues/29868#issuecomment-868982699) – aochagavia Jun 26 '21 at 10:41

1 Answers1

5

Your best bet would be to submit your executable to MS Defender Team as sample for review at: https://www.microsoft.com/en-us/wdsi/filesubmission, mention in comment your issue. They are releasing defender updates almost daily basis so it should not be a big deal

One more thing you can help yourself with is to get your exe in the exclusion list of Defender AV (mostly Microsoft trusted locations are often in exclusions) so it should be no brainer.

And of course open a case with Microsoft in parallel to help you there.

Shahid Roofi Khan
  • 957
  • 1
  • 8
  • 19