by Kevin Schroeder | 9:07 am

I was trying to do a git pull from GitHub this morning from the windows CLI (actually, Cygwin xterm) and it was horribly slow.  Most of the time I just CTRL-C out of it and go to PhpStorm and work from their git integration, but I had to do something weird and decided to look into it.  It turns out that the antimalware service executable was eating up most of my time.

anti-malware

For large commits it would take several seconds, if not a minute or two, to execute any operations.

However, the solution for this is quite simple.  There are two solutions, both of which can be used.  The first is to set a directory exclusion.  The second is to set up a process exclusion.

Search Windows for Windows Defender and select the Settings button.

settings

Go to Exclusions

exclusions

Then either add a directory exclusion

directory-exclusion

or a process exclusion

process-exclusion

I can’t say that I know exactly how Windows defender works but so far it seems like adding the directory exclusion is sufficient to increase performance.  Windows Defender is still running a little hotter in the background, but it’s nowhere near the full CPU time.  I would also guess that approach is a little safer.  Technically someone could use an exploited git checkout evil code into a known location and then execute the contents.  But the likelihood of them knowing where your development directories are is quite low.

Comments

Rancher Lara

Glad it worked !!! Finally found a solution that’s working!!!

Jun 02.2017 | 05:11 am

Anon

IT WORKS!!!!!!! WOOOO!!! Finally

Aug 04.2020 | 06:25 pm

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.