Bug 548443 - Windows10 Defender significantly slows down and freezes Eclipse
Summary: Windows10 Defender significantly slows down and freezes Eclipse
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 4.13   Edit
Hardware: PC Windows 10
: P3 major with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Niraj Modi CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 550125 573038 (view as bug list)
Depends on: 548893 548894 529428 548431
Blocks:
  Show dependency tree
 
Reported: 2019-06-19 12:34 EDT by Tim Webb CLA
Modified: 2023-04-11 16:03 EDT (History)
41 users (show)

See Also:


Attachments
Screenshot of Task Manager (25.78 KB, image/png)
2019-06-19 12:34 EDT, Tim Webb CLA
no flags Details
ProcessMonitorTool_Result_WithoutAnyExclusionFolderUnderDefender (5.86 MB, application/octet-stream)
2019-09-27 05:09 EDT, Niraj Modi CLA
no flags Details
ProcessMonitorTool_Result_With_EclipseRoot_ExclusionFolderUnderDefender (720.02 KB, application/octet-stream)
2019-09-27 05:12 EDT, Niraj Modi CLA
no flags Details
"Process Monitor" filter settings (65.57 KB, image/png)
2019-09-27 05:15 EDT, Niraj Modi CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Webb CLA 2019-06-19 12:34:06 EDT
Created attachment 279005 [details]
Screenshot of Task Manager

For new users installing Eclipse, Windows Defender by default on Windows 10 can have a significant impact on startup times. This is observed regardless of Eclipse or Java version. Most noticeable of course on larger packages, such as the JEE distribution of Eclipse.

To reproduce:
1. Grab any EPP Eclipse package in Zip form (I believe will also impact Eclipse Installer though installer was failing at time of logging this)
2. Ensure that Windows Defender on Windows 10 is running with default settings (aka that eclipse.exe or the extract folder isn't excluded from scanning)
3. Open Task Manager
4. Startup Eclipse

Note that the "Antimalware Service Executable" process running "Windows Defender Antivirus Service" will run for between 1 and 3 minutes. When it finally completes, the workspace dialog prompt will come up.

For larger IDEs or updates to large configurations (aka updating to 2019-06), this same slowdown is observed during first launch after upgrade.

Workaround:
Add to the Windows Defender's Exclusions list "eclipse.exe" to bypass it scanning the install.

Observation:
It appears this is related to Windows Defender scanning Jars as they are accessed as the Eclipse process does slowly make some headway using a tiny bit of CPU itself.
Comment 1 Rolf Theunissen CLA 2019-06-19 14:39:49 EDT
If I am correct, also the progress bar is not shown yet on the splash screen.
Comment 2 Dani Megert CLA 2019-06-19 16:11:03 EDT
Niraj, please have a look.
Comment 3 Niraj Modi CLA 2019-06-26 03:11:15 EDT
Currently eclipse.exe and eclipsec.exe are unsigned and that's the reason Windows Defender tries to scan it.

Sravan is try to create a signed Eclipse executables via bug 548431
Comment 4 Rolf Theunissen CLA 2019-06-26 05:54:41 EDT
(In reply to Niraj Modi from comment #3)
> Currently eclipse.exe and eclipsec.exe are unsigned and that's the reason
> Windows Defender tries to scan it.
> 
> Sravan is try to create a signed Eclipse executables via bug 548431

Most likely the unsigned executable is related, but not the complete fix for this issue, see Bug 548397 comment 16 and https://www.eclipse.org/lists/platform-dev/msg01728.html.

In general, Windows Defender will also scan signed files as it does not trust any file by default. Only if signed by an Extended Validation certificate, a file will be trusted by Windows Defender. See also, https://www.microsoft.com/security/blog/2018/08/16/partnering-with-the-industry-to-minimize-false-positives/.

Furthermore, I wonder if the DLL-libraries should be signed as well? Is there any impact expected of having signed or unsigned libraries loaded in the executable?
Comment 5 Ed Merks CLA 2019-06-26 06:33:24 EDT
Yes, I just noticed yesterday too that none of the DLLs are signed. Typically the are packed in a signed jar, but end up being unpacked during installation, I believe...
Comment 6 Rolf Theunissen CLA 2019-07-24 09:33:33 EDT
Any status update on this one?

Windows Defender does not only significantly impact startup times. Many other operations are slowed down when executed for the first time. One of the most notable: Help > About, and Installation details > Plug-ins.
Comment 7 Hernan Gonzalez CLA 2019-08-04 10:49:54 EDT
Wow, this should be more publicized!

This makes all the diffence for me, in Windows-7 with MSE (Microsoft Security Essentials).

These are my (quite consistent) times, in seconds, for Eclipse startup,
running Build 20190614-1200 (Eclipse IDE for RCP and RAP Developers) on Win 7-64 (6GB RAM, SSD, Core Duo Q9650).

                    SPLASH      TOTAL
COLD, MSE:           60         145     
COLD, no MSE:        13          20     
WARM:                 9          12     

SPLASH: until Splash screen disappears. TOTAL: until Eclipse is responsive
COLD: first run after Windows start
no MSE: eclipse dir excluded from MS Security Essentials

"Warm" startup times are not affected by MSE exclusion.
Comment 8 Rolf Theunissen CLA 2019-08-14 11:57:24 EDT
Just running "jar -tf some.jar" makes Windows Defender spike on CPU usage. Try running it on all jars in an Eclipse folder...

Looks like any program using jars will be slowed down by Windows Defender.
Comment 9 Julian Honnen CLA 2019-08-15 07:10:55 EDT
The current IntelliJ version has a Windows Defender detection [1]. You get a notification with an option to automatically configure exclude filters.
Although I think it excluded the project/gradle home, not the IntelliJ installation itself.

Apart from the signing issue, excluding my eclipse workspace improved build times a lot. So maybe we should do something similar?


[1] https://blog.jetbrains.com/idea/2019/06/intellij-idea-2019-2-eap5-commit-from-local-changes-and-more/
Comment 10 Rolf Theunissen CLA 2019-08-15 07:34:01 EDT
(In reply to Julian Honnen from comment #9)
> The current IntelliJ version has a Windows Defender detection [1]. You get a
> notification with an option to automatically configure exclude filters.
> Although I think it excluded the project/gradle home, not the IntelliJ
> installation itself.
> 
> Apart from the signing issue, excluding my eclipse workspace improved build
> times a lot. So maybe we should do something similar?
> 
> 
> [1]
> https://blog.jetbrains.com/idea/2019/06/intellij-idea-2019-2-eap5-commit-
> from-local-changes-and-more/

Something like that might help, but it requires the user to have administrator rights. Which many do not have (including me).
Comment 11 Julian Honnen CLA 2019-08-15 08:20:49 EDT
(In reply to Rolf Theunissen from comment #10)
> Something like that might help, but it requires the user to have
> administrator rights. Which many do not have (including me).

There was also an option to show instructions to configure filters manually. At the very least, the notification would shift the blame from eclipse to the IT department ;)
Comment 12 Rolf Theunissen CLA 2019-08-15 08:31:51 EDT
(In reply to Julian Honnen from comment #11)
> (In reply to Rolf Theunissen from comment #10)
> > Something like that might help, but it requires the user to have
> > administrator rights. Which many do not have (including me).
> 
> There was also an option to show instructions to configure filters manually.
> At the very least, the notification would shift the blame from eclipse to
> the IT department ;)

True, and user get more aware of the issue.

I only wonder how to shift the blame to Windows Defender, after all they cause the performance issues in many other programs. Or at least they must have instructions how to prevent the performance issues.
Comment 13 Rolf Theunissen CLA 2019-08-16 04:21:05 EDT
It might be good to add a comment in the release notes as well.
Comment 14 Rolf Theunissen CLA 2019-08-16 10:11:32 EDT
I have reported the issue to Microsoft using the "Feedback Hub", please upvote the issue to get more priority within their organization:

https://aka.ms/AA5u6j9
Comment 15 Rolf Theunissen CLA 2019-08-17 01:07:47 EDT
*** Bug 550125 has been marked as a duplicate of this bug. ***
Comment 16 Rolf Theunissen CLA 2019-08-17 01:13:52 EDT
Got another confirmation that Windows Defender slows down many operations, and results in many UI freezes, see bug 550125. Any I/O operation is potentially affected.

Changing the title to broaden the scope of the issue.
Comment 17 Niraj Modi CLA 2019-08-19 03:04:00 EDT
Some update on Signing of windows executables, which is work in-progress and is required at multiple projects:
1. DLLs signing bug 529428
2. In Eclipse Repo bug 548431(partially done in 4.13)
3. PDE bug 548894
4. Tycho bug 548893

Moving to 4.14 as the dependent bugs are not completed yet.
Comment 18 Tim Webb CLA 2019-08-26 14:33:03 EDT
Following up on the mention of IntelliJ having detection code, here you can see the logic used to do detection:

https://github.com/JetBrains/intellij-community/blob/50dad46e47402f029c4aab96086208caf9f90432/platform/platform-impl/src/com/intellij/diagnostic/WindowsDefenderCheckerActivity.kt
https://github.com/JetBrains/intellij-community/blob/50dad46e47402f029c4aab96086208caf9f90432/platform/platform-impl/src/com/intellij/diagnostic/WindowsDefenderChecker.java

The actual checker is quite simple and even if we can't or don't have time to take on automatically fixing, at least letting the user know that Windows Defender is likely having a huge impact to performance with links to learn more, that could go a long way.
Comment 19 Niraj Modi CLA 2019-09-17 03:21:28 EDT
(In reply to Tim Webb from comment #0)

> Workaround:
> Add to the Windows Defender's Exclusions list "eclipse.exe" to bypass it
> scanning the install.
Eclipse launch timings compared with & without any Win10 defender "Exclusion list":
1. Without any Windows 10 defender "Exclusion list":
- initial splash screen is seen for 15 seconds, then workspace dialog opens.
- after workspace selection, it takes approximately 60 seconds to open workspace
Total time taken: 1 min and 15 secs

2. With workspace folder only added to "Exclusion list":
- initial splash screen is seen for 12 seconds, then workspace dialog opens.
- after workspace selection, it takes approximately 50 seconds to open workspace
Total time taken: a little over 1 minute.

3. With eclipse root folder only added to "Exclusion list":
- initial splash screen is seen within 5 seconds, then workspace dialog opens.
- after workspace selection, it takes less than 15 seconds to open workspace
Total time taken: 20 seconds at max.

4. With both workspace and eclipse root folders added to "Exclusion list":
- initial splash screen is seen within 5 seconds, then workspace dialog opens.
- after workspace selection, it takes less than 15 seconds to open workspace
Total time taken: 20 seconds at max.

> Observation:
> It appears this is related to Windows Defender scanning Jars as they are
> accessed as the Eclipse process does slowly make some headway using a tiny
> bit of CPU itself.
Yes I confirm on above point, adding Eclipse root directory to the Windows 10 defender "Exclusion list" is what matters, which specifically skips scanning of the jars and speeds up the Eclipse launch time.
Comment 20 Eike Stepper CLA 2019-09-17 04:28:28 EDT
I'd like to point out that installations with a shared bundle pool (for example as created by the Eclipse Installer) have most of their jars NOT living in/under the eclipse root folder!

I'm using a malware detection tool different from Windows' Defender and I had to exclude the directory of my shared bundle pool from malware detection, too. One advantage of a shared pool is that you only need to exclude it once and then all future installations start up fast ;-)
Comment 21 Niraj Modi CLA 2019-09-18 06:06:16 EDT
(In reply to Rolf Theunissen from comment #14)
> I have reported the issue to Microsoft using the "Feedback Hub", please
> upvote the issue to get more priority within their organization:
> 
> https://aka.ms/AA5u6j9

When I try to open above report, "Feedback Hub" displays below note:
"Your account doesn't have access to this feedback."

Please check if others can view it. Thanks!
BTW, what's the title of the bug report ?
Comment 22 Niraj Modi CLA 2019-09-23 08:16:16 EDT
(In reply to Niraj Modi from comment #21)
> (In reply to Rolf Theunissen from comment #14)
> > I have reported the issue to Microsoft using the "Feedback Hub", please
> > upvote the issue to get more priority within their organization:
> > 
> > https://aka.ms/AA5u6j9
> 
> When I try to open above report, "Feedback Hub" displays below note:
> "Your account doesn't have access to this feedback."
> 
> Please check if others can view it. Thanks!
> BTW, what's the title of the bug report ?

@rolf.theunissen@gmail.com

Did you hear back from Microsoft on this feedback report ?

To bring it to Microsoft's notice, we need to have more up-votes on the ticket. 
Looks like ticket is not visible to others, so I couldn't up-vote on it, any idea ?
Comment 23 Niraj Modi CLA 2019-09-27 05:09:16 EDT
Created attachment 280061 [details]
ProcessMonitorTool_Result_WithoutAnyExclusionFolderUnderDefender

Monitored Eclipse Application using Microsoft's ProcessMonitor tool.
Below Filters needs to be applied/included to view WindowsDefender process activities on jar file:
1. "Process Name" is "MsMpEng.exe"
1. "Process Name" is "MsSense.exe"
3. "Path" ends with "jar"

Result show: Windows defender did close to 3K operations on various Eclipse .jar files over Eclipse launch duration of 1 minute 15 seconds.
Comment 24 Niraj Modi CLA 2019-09-27 05:12:23 EDT
Created attachment 280062 [details]
ProcessMonitorTool_Result_With_EclipseRoot_ExclusionFolderUnderDefender

Monitored Eclipse(with Eclipse Root directory listed under Windows Defender) Application using Microsoft's ProcessMonitor tool.
Below Filters needs to be applied/included to view WindowsDefender process activities on jar file:
1. "Process Name" is "MsMpEng.exe"
1. "Process Name" is "MsSense.exe"
3. "Path" ends with "jar"

Result show: Windows defender did only 21 operations on various Eclipse .jar files over Eclipse launch duration of 20 Seconds.
Comment 25 Niraj Modi CLA 2019-09-27 05:15:15 EDT
Created attachment 280063 [details]
"Process Monitor" filter settings

Sharing a screen grab of "Process Monitor" filter settings for viewing attachment 280061 [details] and attachment 280062 [details]
Comment 26 Niraj Modi CLA 2019-09-27 05:28:30 EDT
(In reply to Niraj Modi from comment #19)
> (In reply to Tim Webb from comment #0)
> 
> > Workaround:
> > Add to the Windows Defender's Exclusions list "eclipse.exe" to bypass it
> > scanning the install.
> 3. With eclipse root folder only added to "Exclusion list":
> - initial splash screen is seen within 5 seconds, then workspace dialog
> opens.
> - after workspace selection, it takes less than 15 seconds to open workspace
> Total time taken: 20 seconds at max.
> 
> 4. With both workspace and eclipse root folders added to "Exclusion list":
> - initial splash screen is seen within 5 seconds, then workspace dialog
> opens.
> - after workspace selection, it takes less than 15 seconds to open workspace
> Total time taken: 20 seconds at max.

A quick video tutorial on how to add/remove a file/folder into Win10 Defender Exclusion list: https://www.youtube.com/watch?v=2mVnESgQm7w
Comment 27 Rolf Theunissen CLA 2019-10-07 05:44:45 EDT
(In reply to Niraj Modi from comment #21)
> (In reply to Rolf Theunissen from comment #14)
> > I have reported the issue to Microsoft using the "Feedback Hub", please
> > upvote the issue to get more priority within their organization:
> > 
> > https://aka.ms/AA5u6j9
> 
> When I try to open above report, "Feedback Hub" displays below note:
> "Your account doesn't have access to this feedback."
> 
> Please check if others can view it. Thanks!
> BTW, what's the title of the bug report ?

The title of the bug report is:
"Eclipse, IntelliJ and other java programs significantly slowed down by Windows Defender"

I did not hear back from Microsoft, all we can do is up-vote the issue or somebody should have a support contract with them.
Comment 28 Niraj Modi CLA 2019-10-09 04:14:01 EDT
(In reply to Niraj Modi from comment #26)
> (In reply to Niraj Modi from comment #19)
> > (In reply to Tim Webb from comment #0)
> > 
> > > Workaround:
> > > Add to the Windows Defender's Exclusions list "eclipse.exe" to bypass it
> > > scanning the install.
> > 3. With eclipse root folder only added to "Exclusion list":
> > - initial splash screen is seen within 5 seconds, then workspace dialog
> > opens.
> > - after workspace selection, it takes less than 15 seconds to open workspace
> > Total time taken: 20 seconds at max.
> > 
> > 4. With both workspace and eclipse root folders added to "Exclusion list":
> > - initial splash screen is seen within 5 seconds, then workspace dialog
> > opens.
> > - after workspace selection, it takes less than 15 seconds to open workspace
> > Total time taken: 20 seconds at max.
> 
> A quick video tutorial on how to add/remove a file/folder into Win10
> Defender Exclusion list: https://www.youtube.com/watch?v=2mVnESgQm7w

Looks like Windows10 Settings are been re-shuffled. Below are the steps to add Eclipse root folder to "Exclusion list" for Windows 1903:
1. Open Windows 10 settings.
2. Search for "Virus & threat protection" and open it.
3. Now click on "Manage settings" under "Virus & threat protection settings" section.
4. Now click "Add or remove exclusions" under "Exclusions" section.
5. Now click "Add an exclusion" then select "Folder"
6. Point to Eclipse Root directory and press "Select Folder"

This adds Eclipse root directory to "Exclusion list" for Windows Defender and hope you see the performance improvements on lines with comment 19 observations.
Comment 29 Niraj Modi CLA 2019-10-09 05:02:02 EDT
(In reply to Rolf Theunissen from comment #27)
> (In reply to Niraj Modi from comment #21)
> > (In reply to Rolf Theunissen from comment #14)
> > > I have reported the issue to Microsoft using the "Feedback Hub", please
> > > upvote the issue to get more priority within their organization:
> > > 
> > > https://aka.ms/AA5u6j9
> > 
> > When I try to open above report, "Feedback Hub" displays below note:
> > "Your account doesn't have access to this feedback."
> > 
> > Please check if others can view it. Thanks!
> > BTW, what's the title of the bug report ?
> 
> The title of the bug report is:
> "Eclipse, IntelliJ and other java programs significantly slowed down by
> Windows Defender"
> 
> I did not hear back from Microsoft, all we can do is up-vote the issue or
> somebody should have a support contract with them.

Thanks Rolf for sharing this, but I am neither able to open the "Feedback Hub" link: https://aka.ms/AA5u6j9 nor able to search the bug report using the bug title.

So, am unable to up-vote your bug report. Not sure what's the reason for it.
Comment 30 Niraj Modi CLA 2019-10-09 05:15:35 EDT
I too reported this problem via Windows10 "Feedback Hub", steps to up-vote:
1. Install "Feedback Hub" application on Windows10
2. Open Edge browser and copy and paste below either of below links:
feedback-hub:?contextid=242&feedbackid=e2b824b8-fbbf-48af-a632-3f12ef73db56&form=1&src=1
or
https://aka.ms/AA67uk5
3. Edge browser will ask for confirmation to open with "Feedback Hub", say Yes to it and now you should be able to see and up-vote the ticket.

Title of the bug report: "Upgrading to Windows 10 significantly slows down Eclipse application, as Windows defender scans all the application *.jar files."
Comment 31 Niraj Modi CLA 2019-10-09 05:27:04 EDT
(In reply to Niraj Modi from comment #30)
> I too reported this problem via Windows10 "Feedback Hub", steps to up-vote:
> 1. Install "Feedback Hub" application on Windows10
> 2. Open Edge browser and copy and paste below either of below links:
> feedback-hub:?contextid=242&feedbackid=e2b824b8-fbbf-48af-a632-
> 3f12ef73db56&form=1&src=1
> or
> https://aka.ms/AA67uk5
> 3. Edge browser will ask for confirmation to open with "Feedback Hub", say
> Yes to it and now you should be able to see and up-vote the ticket.
> 
> Title of the bug report: "Upgrading to Windows 10 significantly slows down
> Eclipse application, as Windows defender scans all the application *.jar
> files."

Note: You should be signed into "Feedback Hub" to up-vote.
Another link to the same which when opened with Edge browser redirects to the bug report:
https://insider.windows.com/en-us/fb/?contextid=242&feedbackid=e2b824b8-fbbf-48af-a632-3f12ef73db56&form=1&utm_source=product-placement&utm_medium=feedback-hub&utm_campaign=feedback-hub-redirect
Comment 32 Eclipse Genie CLA 2019-10-11 07:58:20 EDT
New Gerrit change created: https://git.eclipse.org/r/150948
Comment 34 Ed Merks CLA 2019-10-11 08:03:50 EDT
(In reply to Eclipse Genie from comment #32)
> New Gerrit change created: https://git.eclipse.org/r/150948

Note that for the benefit of users who have installed using the installer (which is generally well over 1/2 of the users), they can follow the same instructions but use it to disable the scanning of the bundle pool folder located in <home>\.p2. This folder contains all the jars used by all Eclipse installations, so it's a one time step regardless of how many installations are created in the future.
Comment 35 Niraj Modi CLA 2019-10-11 08:15:29 EDT
(In reply to Ed Merks from comment #34)
> (In reply to Eclipse Genie from comment #32)
> > New Gerrit change created: https://git.eclipse.org/r/150948
> 
> Note that for the benefit of users who have installed using the installer
> (which is generally well over 1/2 of the users), they can follow the same
> instructions but use it to disable the scanning of the bundle pool folder
> located in <home>\.p2. This folder contains all the jars used by all Eclipse
> installations, so it's a one time step regardless of how many installations
> are created in the future.

Yes, that's an important point we can add the parent folder which has all our Eclipse stuff (all installs and all workspaces).
Comment 36 Rolf Theunissen CLA 2019-10-11 09:42:27 EDT
As already mentioned in the first post: Excluding the 'eclipse.exe' process from scanning also solves all the performance issues.
Comment 37 Niraj Modi CLA 2019-10-11 09:54:36 EDT
(In reply to Rolf Theunissen from comment #36)
> As already mentioned in the first post: Excluding the 'eclipse.exe' process
> from scanning also solves all the performance issues.

As per my observation Win10 Defender sub-processes scans all the JAR files.
Excluding 'eclipse.exe' doesn't works for me and I didn't see major improvements in Eclipse launch timings with this.
Comment 38 Rolf Theunissen CLA 2019-10-12 06:25:26 EDT
(In reply to Niraj Modi from comment #37)
> (In reply to Rolf Theunissen from comment #36)
> > As already mentioned in the first post: Excluding the 'eclipse.exe' process
> > from scanning also solves all the performance issues.
> 
> As per my observation Win10 Defender sub-processes scans all the JAR files.
> Excluding 'eclipse.exe' doesn't works for me and I didn't see major
> improvements in Eclipse launch timings with this.

When 'eclipse.exe' is in the exclusion list, the JARs used by eclipse are not scanned anymore. I did not do any measurements, but the the general performance difference with and without the exclusion rule is significant.
Also IntelliJ has a similar recommendation:
https://intellij-support.jetbrains.com/hc/en-us/articles/360005028939-Slow-startup-on-Windows-splash-screen-appears-in-more-than-20-seconds
Comment 39 Ed Willink CLA 2019-10-16 13:26:20 EDT
I find I must reluctantly leap to Microsoft's defense here. I use Avast and so have Windows Defender suppressed, but I too see a miraculous speed improvement if I add the Eclipse installation and workspace folders to the Avast exceptions. Thanks for the push.

The problem is a generic Virus-checker problem which I first encountered perhaps 20 years ago. The Virus-checker is 'obliged' to check everything for viruses before execution making the computer almost unusable. Smart tooling may proactively maintain an already checked cache reducing the overhead. Custom exclusions can save considerable time at the expense of vulnerabilities. Is every bug repro that you install sure to be virus free?

It appears that newer checkers are less trusting and so check much more or fail to respect earlier contracts on trusted signatures.

So while we might hope that Microsoft will improve the ability of Windows Defender to check less, we should not rely on that. We just need a start up pop-up that if start up seems unduly slow advertises a Wiki page of Virus tuning recommendations.
Comment 40 Eike Stepper CLA 2019-10-17 02:37:21 EDT
I agree with Ed. I use COMODO on Windows 7 and have the same performance problems unless I exclude the jars folder from malware scanning. What's the reason to think that this is a Windows 10 or a Windows Defender only problem?
Comment 41 Dennis Hendriks CLA 2019-10-17 03:08:52 EDT
A company I work at switched from McAfee to Windows Defender (both on Windows 10). No problems before the switch, but severe slowdowns after the switch. If COMODO is also a problem, then some virusscanners may be a problem while others are not.
Comment 42 Ed Merks CLA 2019-10-17 10:02:54 EDT
And not only do virus checkers slow things down, they lock files while scanning.  This can cause problems when updating (or installing with the installer), preventing p2 from moving (renaming) a freshly downloaded jar/zip to its final location. I've had to disable virus scanning of my .p2 folder to avoid this in Windows 7.
Comment 43 Rolf Theunissen CLA 2019-10-18 03:15:38 EDT
(In reply to Ed Merks from comment #42)
> And not only do virus checkers slow things down, they lock files while
> scanning.  This can cause problems when updating (or installing with the
> installer), preventing p2 from moving (renaming) a freshly downloaded
> jar/zip to its final location. I've had to disable virus scanning of my .p2
> folder to avoid this in Windows 7.

As a result of this, also 'eclipse.exe' can be missing, see Bug 530341.
Comment 44 Pierre-Yves Bigourdan CLA 2019-11-19 14:31:17 EST
Well, well, well. 

A few weeks back, I added a comment on the Intellij blogpost that several people have linked here (https://blog.jetbrains.com/idea/2019/06/intellij-idea-2019-2-eap5-commit-from-local-changes-and-more/), something along the lines of "the Windows Defender issue affects other IDEs and more generally all Java programs on Windows; people from the Eclipse Foundation have taken the time to report the bug to Microsoft (https://aka.ms/AA67uk5), feel free to upvote to encourage Microsoft to get this Java issue fixed for everyone". As you can see something pretty neutral and absolutely no links back to anything Eclipse-related or any other Java project.

The message was rejected and deleted by moderation without any explanation. Appalling to see how JetBrains is silencing such critical Windows issues and negatively impacting the whole Java ecosystem on the basis that they would not be the only beneficiaries of such a fix.
Comment 45 Niraj Modi CLA 2019-12-02 04:01:48 EST
(In reply to Niraj Modi from comment #30)
> I too reported this problem via Windows10 "Feedback Hub", steps to up-vote:
> 1. Install "Feedback Hub" application on Windows10
> 2. Open Edge browser and copy and paste below either of below links:
> feedback-hub:?contextid=242&feedbackid=e2b824b8-fbbf-48af-a632-
> 3f12ef73db56&form=1&src=1
> or
> https://aka.ms/AA67uk5

There is not update from Microsoft side on this ticket, moving to 4.15
Comment 46 Jeremy Krieg CLA 2019-12-18 20:14:00 EST
I encountered this issue while working on Bndtools. We ended up adding a special section for Windows users: https://bnd.bndtools.org/chapters/650-windows.html

I note that, in addition to excluding the .p2 pool directory, I also noticed significant speed gains during building by excluding the workspace I was working on, as the build included generating .jar files. I think excluding the .m2 directory also helped a lot, as the project had a lot of Maven dependencies. I also had to exclude my temp directory, as launching the built application writes lots of jar files to the temp directory. Use a custom temp directory to reduce the size of the security hole that this introduces.

Re: excluding eclipse.exe rather than all of the directory exclusions: I tried both approaches but from memory the directory exclusions approach gave better performance. But I admit that I did not do a rigorous comparative test.
Comment 47 Eclipse Genie CLA 2020-02-21 05:45:33 EST
New Gerrit change created: https://git.eclipse.org/r/158072
Comment 49 Marc Bux CLA 2020-03-11 07:45:08 EDT
I am a software developer at KNIME (https://www.knime.com/). I am involved in the development of KNIME Analytics Platform, an open-source platform for data science and analysis that builds on top of Eclipse. Unsurprisingly, we are facing very similar issues as described here: With Windows Defender enabled, startup time of a full KNIME Analytics Platform build goes from tens of seconds to an unacceptable several minutes.

What we have found so far is that the majority of time spent by the Windows Defender lies in unpacking the various plugin JARs and scanning the hundreds of thousands of class files they contain. Repackaging all JARs with a compression level of zero already made the Windows Defender about 40 % faster when starting up KNIME Analytics Platform.

Going even further, we played around with corrupting the plugin JARs by prepending and appending a nonsense byte to their beginning and end. What we found was that the OSGi classloader through java.util.zip.ZipFile was still able to read these JARs (and, thus, KNIME Analytics Platform still operated normally), but the Windows Defender wasn't. This ungainly hack made the Windows Defender interpret the JARs as singleton binary files, making its scanning of these files more than three times as fast (to a point where the slowdown of startup introduced by the Windows Defender wasn't so noticeable any more). Obviously, corrupting, encrypting or otherwise tampering with the JAR files shouldn't be the solution we are aiming for. But it does serve as an indicator of what the Windows Defender spends all that time on.

I hope we'll eventually find a clean solution for this problem that goes beyond suggesting users to add exceptions to their Windows Defender.

On a side note: Unfortunately, I was not able to upvote the feedback you reported on Microsoft's Feedback Hub. It looks like the functionality to upvote Problem feedback has been removed entirely by Microsoft.
Comment 50 Carsten Hammer CLA 2020-05-31 18:24:07 EDT
I think some code paths do not make use of buffered input/output streams when working on fileinput/outputstream and because of that have a performance issue. I would not be surprised if defender just makes a bad situation worse.
See https://git.eclipse.org/r/#/c/163907/
Comment 51 Pierre-Yves Bigourdan CLA 2020-11-20 05:51:51 EST
Microsoft have opened a new feedback repository to "make Windows better for Java developers", so I've re-reported the issue there: https://github.com/microsoft/java-wdb/issues/9
Comment 52 Niraj Modi CLA 2020-12-02 02:21:51 EST
Planning to update 4.18 "readme_eclipse.html" for this problem & workaround.
Comment 53 Eclipse Genie CLA 2020-12-02 02:38:24 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.releng/+/173196
Comment 55 Eclipse Genie CLA 2020-12-02 04:58:33 EST
New Gerrit change created: https://git.eclipse.org/r/c/www.eclipse.org/eclipse/+/173208
Comment 57 Niraj Modi CLA 2020-12-02 05:27:14 EST
(In reply to Niraj Modi from comment #52)
> Planning to update 4.18 "readme_eclipse.html" for this problem & workaround.

ReadMe entry can be found on below link:
https://www.eclipse.org/eclipse/development/readme_eclipse_4.18.php#mozTocId238091
Comment 58 Eclipse Genie CLA 2020-12-15 06:18:30 EST
New Gerrit change created: https://git.eclipse.org/r/c/www.eclipse.org/eclipse/news/+/173814
Comment 60 Lars Vogel CLA 2021-11-02 03:47:49 EDT
*** Bug 573038 has been marked as a duplicate of this bug. ***
Comment 61 Rolf Theunissen CLA 2022-03-08 09:00:18 EST
*** Bug 578595 has been marked as a duplicate of this bug. ***
Comment 62 Rolf Theunissen CLA 2022-04-04 09:28:13 EDT
IntelliJ has detection in place that project location is being slowed down by Windows Defender. It shows an popup that the situation is detected. Also, it offers to change your configuration. 
Such a solution give a much better warning to the user than the Eclipse message in the release notes, which is not prominent on the default download page https://www.eclipse.org/downloads/.

Code is available under Apache license.

https://intellij-support.jetbrains.com/hc/en-us/articles/360006298560
Comment 63 Michael Keppler CLA 2023-04-11 16:03:02 EDT
Firefox developers recently made Microsoft fix a severe performance issue in Defender which slowed down Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1441918. See comment 87 there for the actual technical root cause. We might want to do another measurement of whether the Eclipse slowdown is also fixed with the new Defender version mentioned at the end of the thread.