3 ms·
> Just take a look at the Win32 API. So many calls are slow AF and just reading a file off the disk in Windows requires 1000s of syscalls and confext switches-
by temac 7y ago
> Just take a look at the Win32 API. So many calls are slow AF and just reading a file off the disk in Windows requires 1000s of syscalls and confext switches- because of too much "safe" abstractions built over the years.
Windows, like any big system, has problems, but not this one. Its FS is slow, but not for this reason.
- cliffdover 7y agoWhat's the reason? Genuinely curious.
- popotamonga 7y agosometimes i wonder why does explorer listing 100k files in a path can take minutes. And searching the whole disk for a partial filename? tens of minutes. I can do both in a database on the same machine in seconds...
- wongarsu 7y agoYou might like Voidtools Everything, a free tool that does partial filename searches in milliseconds. It's incredibly useful for finding files. https://www.voidtools.com/ https://www.voidtools.com/
- wongarsu 7y agoAt least part of the reason is flexibility. For example Windows has the File System Filter Driver system [0] which allows you to execute arbitrary code to observe, modify or prevent any (filesystem) I/O action. That's for example how a virus scanner can scan any file before it's opened (and of course any Windows system nowadays has a virus scanner running, even if "only" Windows defender. But you can have any number of such modules running (for logging, encryption, backup, etc), each being called for every file access. Another problem is that the Windows Api is designed differently from the Linux Api. Windows is optimized for network drives, Linux more for local drives. Software designed for Linux often hits access patterns that don't perform well in Windows. 0: https://docs.microsoft.com/en-us/windows-hardware/drivers/ifs/what-is-a-file-system-filter-driver- https://docs.microsoft.com/en-us/windows-hardware/drivers/if...