I 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…
A large part of Windows slowness is NTFS, as you allude to in your last sentence. There are a myriad ways to slow the damn thing down, and none to make it significantly faster. There's also the issue that it seems to slow down exponentially with directory size. In short, worst FS for building large software. As for the OP's build time complaint about XCode - don't do that. Use the make build instead. Not only does XC…
Why is Windows so slow?
141–150 of 159 posts
Re: Why is Windows so slow?
#142I 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…
Every file on Windows keeps ~1024 bytes of info in the file cache. The more the files the more cache would be used.
Recent finding, that sped up our systems from 15->3sec on 300,000+ files filestamp check was to move from _stat to GetFileAttributesEx.
One would not think of doing such things, after all the C api is nice, open, access, bread, _stat are almost all there, but some of these functions do a lot of CPU intensive work (and one is not aware, until just a little bit of disassembly is done).
For example _stat does lots of divisions, dozen of kernel calls, strcmp, strchr, and few other things. If you have Visual Studio (or even Express) the CRT source code is included for one to see.
access() for example is relatively "fast", in terms that there is just mutex (I think, I'm on OSX right now), and then calling GetFileAttributes.
And back to RamMap - it's very useful in the sense that it shows you which files are in the cache, and what portion of them, also very useful that it can flush the cache, so one can run several tests, and optimize for hot-cache and cold-cache situations.
Few months ago, I came up with a scheme, borrowing idea from mozilla - where they would just pre-read certain DLLs that would eventually came up to be loaded (in a second thread).
I did the same for one our tools, the tool is single threaded, reads, operates, then writes. And it usually reads 10x more than it writes. So while the process operation was able to get multi-threaded through OpenMP, reading was not, so instead I had a list of what to read ahead, in a second thread, so that when it comes to the first thread, and it wanted to read, it was taking it from the cache. If the pre-fetcher was behind, it was skipping ahead. There was not even need to keep the contents in memory, just enough to read, and that's it.
For some other tool, where reading patterns cannot be found easily (deep-tree hierarchy) I've made something else instead - saving in a binary file what was read before for the given set of command-line arguments (filtering some). Later that was reused. It cut down on certain operations 25-50%.
One lesson I've learned though is to let the I/O do it's job from one thread... Unless everyone has some proper OS, with some proper drivers, with some proper HW, with....
Tim Bradshaws' widefinder, and widefinder2 competition had also good information. The guy that win it, has on his site some good analysis of multi-threaded I/O (can't find the site now),... But the analysis was basically that it's too erratic - sometimes you get speedups, but sometimes you get slowdowns (especially with writes).
Re: Why is Windows so slow?
#143Here is some example:
Re: Why is Windows so slow?
#144I'm disappointed HN! There is a lot of pontificating, but not much science here. It takes all of 2 minutes to try this experiment yourself (plus ~8 minutes for the download). 1. Download chromium http://chromium-browser-source.commondatastorage.googleapis.... 2. Unzip to a directory 3. Create this batch file in the src directory, I called mine "test.bat" echo start: %time% >> timing.txt dir /s > list.txt echo end: %t…
Try 'fsutil disablelastaccess 0'. Not sure if that's the case for the OP, but lastaccess is horrible on performance.
Re: Why is Windows so slow?
#145Someone posted the question on StackOverflow and it got closed as "not constructive". Is there a way to browse the "not constructive" questions on SO? They seem to be all the best ones.
http://data.stackexchange.com/ It's an online SQL tool for analyzing the stackoverflow data dump (last update was Sept 2011; they're quarterly http://blog.stackoverflow.com/category/cc-wiki-dump/ ). It's very cool, but curiously hard to find. There's a "[data-explorer]" tag at meta.stackoverflow: http://meta.stackoverflow.com/questions/tagged/data-explorer The PostHistory table probably records why posts were closed.
score id post
1416 1711 What is the single most influential book every programmer should read?
1409 9033 Hidden Features of C#?
1181 101268 Hidden features of Python
979 1995113 Strangest language feature
736 500607 What are the lesser known but cool data structures?
708 6163683 Cycles in family tree software
671 315911 Git for beginners: The definitive practical guide
653 662956 Most useful free .NET libraries?
597 891643 Twitter image encoding challenge
583 83073 Why not use tables for layout in HTML?
579 2349378 New programming jargon you coined?
549 621884 Database development mistakes made by application developers
537 1218390 What is your most productive shortcut with Vim?
532 309300 What makes PHP a good language?
505 1133581 Is 23,148,855,308,184,500 a magic number, or sheer chance?
488 114342 What are Code Smells? What is the best way to correct them?
481 432922 Significant new inventions in computing since 1980
479 3550556 I've found my software as cracked download on Internet, what to do?
479 380819 Common programming mistakes for .NET developers to avoid?
473 182630 jQuery Tips and Tricks
The query (also at http://data.stackexchange.com/stackoverflow/s/2305/top-close...
) - have a play. SELECT top 20
p.score, p.id, p.id as [Post Link]
FROM Posthistory h
INNER JOIN PosthistoryTypes t ON h.posthistorytypeid = t.id
INNER JOIN Posts p ON h.postid = p.id
WHERE
t.name = 'Post Closed'
GROUP BY p.score, p.id
ORDER BY p.score DESCRe: Why is Windows so slow?
#146I 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…
You can build almost any Visual Studio project with out using visual studio at all. Visual Studio project files are also MSBuild files. I've setup lots of build machines sans Visual Studio, projects build just fine with out it. MSBuild does suck in that there is little implicit parallelism, but you can hack around it. I have a feeling that the Windows build slowness probably comes from that lack of parallelism in msb…
/m enables parallelism on the .NET side. Perhaps the same thing exists for the native compiler?
Re: Why is Windows so slow?
#147Re: Why is Windows so slow?
#148Earlier quoted context omitted.
The %VSROOT%\VC\bin\amd64 is indeed a native x64 binary.
Yes, but it can only produce x64 code; it can't produce x86 code. Mind you, I'd love to be wrong about that...
Re: Why is Windows so slow?
#149Earlier quoted context omitted.
It's an optional install package when you install Visual Studio.
We have it installed, do you have any reference about how to use it from a build process?
Re: Why is Windows so slow?
#150Earlier quoted context omitted.
We've done compiler tests between VC express 2010 and GCC (Mingw gcc 4.6.x branch) at work with GCC beating VC express at '-O3 -ffast-math -march=corei7' vs '/O2 /arch:SSE2' for our code on Intel Core i7 nehalem. GCC even beat ICC on certain tests on that same Intel hardware. What we weren't able to compare between the compilers was link-time optimization and profile-guided optimization since Microsoft crippled VC ex…
So when you didn't use the two most important perf features in MSC, its performance was underwhelming. This is no surprise. Also, if you were doing anything heavily floating-point, MSC 2010 would be a bad choice because it doesn't vectorize. Even internally at Microsoft, we were using ICC for building some math stuff. The next release of MSC fixes this.