Most active commenters
  • dataflow(3)

←back to thread

752 points dceddia | 11 comments | | HN request time: 1.267s | source | bottom
Show context
dataflow ◴[] No.36447655[source]
I'm gonna guess here that the biggest chunk is the antivirus. Turning off Windows Defender's protection(s) should give the first visible speed boost, if that's what you prefer.

Another big chunk of this likely happened when they hardened the graphics subsystem for security. Win32 user calls are unbelievably expensive nowadays. SendMessage etc. have a ton of overhead.

Another chunk is likely the sheer number of expensive DLLs that need to be loaded and initialized with most apps. For example, IIRC, the moment you load COM or WinSock DLLs, your app stops loading snappily. Pretty much anything will load COM even without intending to.

Another chunk is IMM - the ctfmon process you love, for multi-language/keyboard support. ImmDisable(0) can make loading a bit snappier, but then good luck with keyboard switching and the like. It uses window hooks, which are slow Win32 calls as mentioned.

People think it's just a matter of writing plain Win32, but that's not the whole story, although it certainly helps compared to more heavyweight frameworks.

replies(3): >>36448448 #>>36449276 #>>36452190 #
1. Narishma ◴[] No.36448448[source]
> Turning off Windows Defender's protection(s) should give the first visible speed boost, if that's what you prefer.

It's extremely hard to do that in recent versions of Windows. The most I managed to do the last time I tried was to disable it temporarily but it always comes back after a while.

replies(5): >>36448843 #>>36449591 #>>36450008 #>>36455888 #>>36456892 #
2. dataflow ◴[] No.36448843[source]
Yeah, unfortunately you need to do it with group policy.
replies(1): >>36450651 #
3. asylteltine ◴[] No.36449591[source]
There is a great script on GitHub which will disable it to the core.
4. jandrese ◴[] No.36450008[source]
A couple of years ago I was doing a mass copy of files from one SSD to another. It was a few hundred GB, not terribly big on modern machines but it did have a large number of tiny files. Windows was doing the copy but it was estimating that the whole thing would need 8 hours to complete, and the estimate was pretty solid after 20 minutes. I cancelled the copy to investigate and tried turning off Windows Defender (but only temporarily as you said) and restarted the copy. It finished in 35 minutes. Probably would have been even faster if I didn't have one of the drives hooked to an old USB->SATA adapter.

This is also why your browser will stall out when it finishes downloading a large file. Windows Defender kicks in an does a full scan before returning from the close call.

replies(1): >>36456912 #
5. Dylan16807 ◴[] No.36450651[source]
As far as I can tell they've removed the ability to turn off real-time scanning with group policy, so you have to disable the entire thing and not get on-demand or scheduled or download scans.
replies(2): >>36451608 #>>36454100 #
6. eppsilon ◴[] No.36451608{3}[source]
Defender will disable itself if it detects another AV product is installed...maybe someone should make one that acts as a no-op AV scanner.
7. arsome ◴[] No.36454100{3}[source]
Seems to be working for me still, though I set the GPO back on Win10 and it carried over to Win11 through an upgrade. I see some reports of needing to disable tamper protection first but should still work.
replies(1): >>36454124 #
8. dataflow ◴[] No.36454124{4}[source]
Ah yes, you need to disable tamper protection as well. (Which is kind of strange... if a virus can disable the first one can't it also disable the second one??)
9. THENATHE ◴[] No.36455888[source]
I’ve wanted to use one of those “gaming focused” stripped down windows installs for the longest time because all of the garbage is removed. It’s like Linux but not a pain in the ass for playing games and doing mundane shit. Too bad I care about security
10. navjack27 ◴[] No.36456892[source]
It's easy to do. You set exclusions for whole root drive letters. It scans nothing for me on Windows 11
11. ◴[] No.36456912[source]