←back to thread

752 points dceddia | 4 comments | | HN request time: 0.813s | source
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. nullindividual ◴[] No.36452190[source]
You don't need to turn off Windows Defender, you need to disable the file system filters entirely.

You can do that with Dev Drive [0][1] which is currently on the Win 11 dev branch.

You can't do this for your boot volume, but you can do it for a [dynamically expanding] VHDX, secondary partition, or secondary volume. It will use ReFS (oddly enough, with 4 KiB clusters by default -- though it makes sense for the target scenario, unlike past uses of ReFS).

[0] https://learn.microsoft.com/en-us/windows/dev-drive/

[1] https://blogs.windows.com/windowsdeveloper/2023/06/01/dev-dr...

replies(2): >>36452266 #>>36467541 #
2. dataflow ◴[] No.36452266[source]
> You don't need to turn off Windows Defender, you need to disable the file system filters entirely.

> You can't do this for your boot volume

How would this help with firing up all the built-in OS apps (Explorer, Notepad, etc.) being tested in the video?

replies(1): >>36452416 #
3. nullindividual ◴[] No.36452416[source]
It certainly wouldn't (though I don't experience the same issue, so not sure what to say to the video). Presumably your heavier apps would be installed to the Dev Drive.
4. aoetalks ◴[] No.36467541[source]
How did I not hear about this before on HN? This is pretty cool.