Making windows less slow (Defender)

I recently switched to Windows (the hardware is pretty good these days, comparable to Mac, except I get to keep my USB ports, HDMI, and my function keys! oh, and I got a 4K touchscreen - and Microsoft copied so much of macOS that it feels like home).

Anyway, Defender makes my Meteor rebuild crawl. I can disable realtime protection to make that faster, but that doesn’t seem like the right solution. Anyone know a better way?

I did find this, but I’m not sure if adding .js files to this list will work. Any Windows gurus know how to make this less painful?

I can’t help with that issue; just wanted to say that Linux is always an option! I switched from MacOS to Fedora and am loving life.


I ran Ubuntu ages ago, and liked it until they did that stupid Unity thing - I could probably get by with a standard Gnome UI though.

My problem is always that I work with a lot of designers who send me Photoshop and Illustrator (and sometimes InDesign) documents, and I need to be able to open those. That ties me to Windows and macOS. I’d actually like to run hackintosh, but I haven’t been able to make it work yet. :smiley:

I’ve added exclusions to Windows Defender for:

  • node.exe
  • 7z.exe
  • meteor.bat
  • mongod.exe
  • and the meteor folder at C:\Users%USERNAME%\AppData\Local.meteor\

Also I’ve found that using bash with meteor has a ton of problems

And because the Windows filesystem is not well suited to node apps, try and make sure you’re not adding particularly fat node_modules

I mean it’s unbearably slow - it makes me want to gauge my eyes out while I’m waiting, and that’s with Defender’s Real-time protection simply turned off. I suppose it’s possible that this new computer just isn’t fast enough - it does have a “U” Intel processor (i7-8550U), but man is this slow. It’s really unusably slow…

It spends forever on Building for - that seems to be the slowest part

I mean, Windows has other problems - like scrolling gets ridiculously slow in VS Code on windows, requiring a quick cycle through maximized and not. This is Microsoft’s code editor, running on Microsoft’s platform.

1 Like

I wonder if a docker based meteor build container would be faster

I think adding the meteor folder C:\Users%USERNAME%\AppData\Local.meteor\ to the exceptions list has helped a bit - thanks for that!

This performance problem is continuing to be a real serious barrier to using Meteor on Windows. It’s just so so slow. Has anyone had any luck at all in making it not feel like your developing on 1999 hardware?

I’ve tried a bunch of things - including:

  • completely disabling Windows Defender.
  • running in cygwin (just doesn’t work, and is also slower)
  • running in WSL (doesn’t work - mongo locks)

On top of that, Windows is just awful in general - two different terrible terminals (Powershell and command line) - I’m not sure how they can still be that unpleasant to interface with, but they are both just the worst (and that obnoxious “QuickEdit” feature - what even is that?). On the other hand, webpack doesn’t seem to be anywhere near as slow as Meteor is. But even VS Code is more buggy on Windows than on macOS - this is Microsoft’s own baby!

I’m probably going to try Ubuntu proper and see if that improves things on the same hardware, but the Meteor development story on Windows is not great. Part of that is just Windows, but part of it is Meteor.

Have you tried running Meteor in a virtual machine? One of our developers does that, and he has the fastest rebuilds of anyone on the team (although to be fair he has a super fast machine).

I think he uses Virtualbox with Samba for file syncing.

I could do that - worth a try!

It’s about 20 seconds between when the terminal says “Meteor Server Restarted” and the page actually responds in the browser. That can’t be normal, even on Windows - can it?

1 Like

I tried to set up a VM with Docker. What an absolute nightmare. There are all kinds of things you have to do differently on Windows, from macOS or Linux, and none of the documentation even hints at it. Going to try just running a custom VM in VirtualBox.

Update: It looks like there’s just like 20 different docker packages- or at least 3 different main groupings, that seem to have come in phases over time, leaving behind a lot of outdated tutorials and answers all over the place. Boot2Docker, which a lot of the search results reference is incredibly old, replaced by docker-machine. That goes along with Docker-Toolkit, which has some GUI stuff. But that’s outdated now too, and has been replaced with Docker for Windows, which also uses docker-machine. But that requires a Pro or higher level of Windows, and Microsoft is sticking me up for $!00 to upgrade to that. I’m really starting to see (and remember) why developers have fled Windows over the years, and gone to macOS, though now Apple is sticking everyone up for fixed hardware, at premium prices. When I’m feeling ambitious I’m going to be moving to Linux of some kind (maybe Elementary OS, or probably just back to Ubuntu). For now I’m going to try docker-machine with docker-toolkit again, and see if I can make that work.

All this just to not have a 1 minute turn around every time I save a file on Windows.

Switching to Linux is exactly what I did a while back and couldn’t be happier. On Windows just had the feeling of swimming against the current. Although I do realize that not everyone is willing to make the switch solely because of Meteor.

1 Like

You might have better luck if you provision Virtualbox using Vagrant. In the Vagrant config you can just do:

config.vm.provision "docker"

Using Vagrant will also get you a bunch of other stuff for free.

At some point I should probably write up a blog post on how are dev environment works. There are a definitely a few gotchas…

1 Like

There are so many problems with Docker on Windows (especially since I don’t have Pro Windows - what even is that? I got my PC, paid my money, and now MS wants to stick me up for another $100? That alone is worth using ANYTHING else).

I ended up trying a lot of different things, each one ending in various forms of disaster.

  • Chocolatey. Most of the time it doesn’t work, there are a ton of outdated packages in it’s repos, which you can only learn about if you look it up in a google search, and it’s not even “sudo-less”. It’s not the package manager Windows desperately needs, even if it’s probably the best we can do on Windows…
  • Docker is a nightmare for this kind of basic dev stuff in general (too many options, a lot of outdated info, and just way too hard for such a simple desire), and even more so on Windows - see previous posts.
  • VirtualBox doesn’t work well. Even when I gave up on Docker, I still couldn’t get shares to work in VirtualBox with either Ubuntu or Elementary OS. I couldn’t even get a basic network share to work correctly. Additionally, I can’t get GUI acceleration to work. That wouldn’t be a problem for a simple GUI-less build server, but it just demonstrates how at every inch, there is another problem to work through.

What I ended up with is VMWare with a vanilla Ubuntu install. I got 3D acceleration working pretty quickly with no crashes, and was able to get network sharing working in about 2 seconds (still have to work out permissions issue though - one of the things I don’t really love about Linux). Rebuilds are now quite fast! I should have just started with this.

I actually forgot how much I like Ubuntu (except that left-sided launcher - bleh). I’m definitely going to switch to that when I get a chance. I’ll just have to keep Windows around for the occasional Adobe file opener and/or gaming session.

1 Like

It wouldn’t be solely because of Meteor. It just seems that Windows is the left over OS from last decade. I mean, nothing works as you would expect - or even as the various guides out there suggest that it should. I’ve had various issues getting things working on macOS, but nothing like this level of frustration - it really feels like in a 4 step process, each step has 3 or 4 different unexpected problems that require separate googling and highly specialized knowledge to work around. Then there’s Windows Defender (and the general architectural problems that make it so necessary)… It’s easy to see why no one will spend any money for this thing.

Vagrant! I forgot about that - probably would be easier. After all this I did learn a few things about Docker - it seems none of the old stuff ever really every goes away, it just gets a new tools and interfaces built on top of it. boot2docker is wrapped by docker-machine, which is bundled with docker-toolkit, and more recently the relatively restricted docker-for-windows.

That’s not the fault of Windows, though. It’s the same mindset which only develops for Chrome to the exclusion of every other browser.

It’s not NOT Windows fault though. The underlying system is so full of ancient backwards compatible left-over crap, that they can’t build anything like a sudo-less environment. Most things actually REQUIRE they be installed with admin privs. And because of that, Windows Defender has to work overtime - it literally scans each file access in serial, blocking access to the next file until it finishes to avoid infection (and it’s still not great at blocking infections). It’s just a mess. MS could be more aggressive at removing older APIs, and start to require code-signing for all apps by default (similar to Apple), but they have this mindset that changing too much would cause too many expensive support calls. It’s similar with Adobe (Steve Jobs was right about them), the other dinosaur of silicon valley. (Sorry for venting, sometimes I feel like I should have just spent the extra $1300 for a mac - but then I remember that you can’t upgrade or repair them… Ubuntu it is!)

All that said - it would be nice to figure out what causes that 20 second lag after the Meteor build completes, to when the server become responsive again. I’ll probably look into that at some point.

1 Like