Interestingly enough Joel Spolsky mentioned something related to the directory listing problem more than 10 years ago. See: http://www.joelonsoftware.com/articles/fog0000000319.html In Joel's opinion it is an algorithm problem. He thinks that there is an O(n^2) algorithm in there somewhere causing trouble. And since one does not notice the O(n^2) unless there are hundreds of files in a directory it has not been fixed…
I don't think there's an O(n^2) algorithm in there. I just created a directory with 100,000 entries. Listing it (from Cygwin, no less, using 'time ls | wc') takes 185 milliseconds. The directory is on a plain-jane 7.2k 1TB drive, though of course it's hot in cache from having been created. 'dir > nul', mind you, is quite a bit slower, at over a second.
Why is Windows so slow?
91–100 of 159 posts
Re: Why is Windows so slow?
#92Earlier quoted context omitted.
Not sure about the other things, but this The default cluster size on NTFS volumes is 4K, which is fine if your files are typically small and generally remain the same size. But if your files are generally much larger or tend to grow over time as applications modify them, try increasing the cluster size on your drives to 16K or even 32K to compensate. That will reduce the amount of space you are wasting on your drive…
That's not the point he's trying to make. Smaller cluster sizes leads to larger amounts of file-system metadata keeping track of where those clusters are laid out on disk, as well as the overhead of generating, accessing, and updating those data structures.
Re: Why is Windows so slow?
#932) Linux forks significantly faster than anything else I know. For something like Chromium the compiler is forked bazillion times and so is the linker and nmake and so on so forth.
3) Linux, the kernel, is heavily optimized for building stuff as that's what the kernel developers do day in and day out - there are threads on LKML that I can't be bothered to dig out right now but lot of effort goes in to optimizing for kernel build workload - may be that helps.
3) Linker - stock one is slower and did not do the more costly optimizations until now so it might be faster because of doing lesser than the MS linker that does incremental linking, WPO and what not. Gold is even faster and I may be wrong but I don't think it does what the MS linker does either.
4) Layers - Don't know if Cygwin tools are involved but they add their own slowness.
Re: Why is Windows so slow?
#94I don't know this poster, but I am pretty familiar with the problem he's encountering, as I am the person most responsible for the Chrome build for Linux. I (and others) have put a lot of effort into making the Linux Chrome build fast. Some examples are multiple new implementations of the build system ( http://neugierig.org/software/chromium/notes/2011/02/ninja.h... ), experimentation with the gold linker (e.g. measu…
Re: Why is Windows so slow?
#95Earlier quoted context omitted.
Please show me something to back this nonsense up.
How about you back up calling it nonsense?
What we weren't able to compare between the compilers was link-time optimization and profile-guided optimization since Microsoft crippled VC express by removing these optimizations.
So when someone makes claims that 'VC++ generates significantly better code than GCC' I want to see something backing that up. Had I made a blanket statement that 'GCC generates significantly better code than VC++' someone would call me on backing up that aswell, and rightly so.
Re: Why is Windows so slow?
#96Re: Why is Windows so slow?
#97To benchmark the maximum shell script performance (in terms of calls to other tools per second), try this micro-benchmark:
while true; do date; done | uniq -c
Unix shells under Windows (with cygwin, etc.) run about 25 times slower than OS X.Re: Why is Windows so slow?
#98Earlier quoted context omitted.
There's a 64-bit version of the MSVC toolchain and MSBuild, so if you build outside of Visual Studio you won't be so constrained. This is how we do our builds here at work (a mix of C# and C++). We still edit code in VS, but local builds and continuous integration are done entirely using MSBuild. As of VS2010, C++ project files are MSBuild projects, and no longer need to use VCBuild.exe.
I didn't know about the 64-bit toolchain, where can you get it?
Re: Why is Windows so slow?
#99If one were optimizing Windows performance, none of the specific areas used as examples would receive much attention given user demographics. What percentage of Windows users use the command line, much less compile C programs, never mind using "cmd" shells to do so?
Windows command line gurus will be using Powershell these days, not the legacy encumbered "cmd" - elsewise they are not gurus.
Re: Why is Windows so slow?
#100NTFS is a slower file system, that's probably the main reason why. Also console I/O is much better on Linux than Windows. Our software builds everyday on FreeBSD, Linux and Windows on servers that are identical. The windows build takes 14 minutes. The FreeBSD and Linux build take 10 minutes (they run at almost identical speed). Check out is more than twice slower on Windows (we use git). Debug build time is comparabl…
There's a 64-bit version of the MSVC toolchain and MSBuild, so if you build outside of Visual Studio you won't be so constrained. This is how we do our builds here at work (a mix of C# and C++). We still edit code in VS, but local builds and continuous integration are done entirely using MSBuild. As of VS2010, C++ project files are MSBuild projects, and no longer need to use VCBuild.exe.
Disclaimer: I work at Microsoft, but this is my hazy recollection rather than some kind of informed statement.