I setup an older PC (with 2GB memory) and wanted to try to use that as a compiling machine to free up my laptop. But, what takes 2 minutes to build on my new laptop takes over 1/2 hour on the old pc!
I'm working in Qt Creator on both machines, and on the old PC it shows "Indexing with clangd" and counts from 1 to 516 (number of files in my project), but that steps takes 30 minutes!
What is the "indexing with clangd" step?
Why is it SO SLOW? HTOP shows 20% free memory, and the CPU's are averaging 70%
Any tips on how to speed this up?
I am using Eclipse for C/C++ development. I am trying to compile and run a project. When I compile and run the project after a while my CPU gets to 100% usage . I checked "Task Manager" and there I found that Eclipse isn't closing any of the previous build and it's running in the background which uses my CPU heavily. How do I solve this problem. When at 100% usage my PC becomes very very slow.
If you don't want the build to use up all your CPU time (maybe because you want to do other stuff while building) then you could decrease the parallelism of the build to a point where it leaves one or more cores unused. For example, if you have 8 cores you could configure your build to only use 6 of them.
Your build will take longer, but your machine will be more responsive for other tasks while the build runs.
Adding More RAM seems to have solved my problem. Disk usage is also low now. Maybe Since there wasnt enough RAM in my laptop the CPU was fetching data from the Disk directly which made the disk usage to go up.
My first post here, but I found a lot of answers regarding C++ and Qt, thanks!
When compiling my Qt Project with mingw32-maxe.exe I only reach 50% of cpu utilization (the Task Manager shows 50% on all 8 diagrams (i7) ), I already tried using -j, -j8, -j9 and -j16 but nothing changes.
Also my CPU never reaches the 2.4GHz (probably due to the low utilization of 50%). My energy-saving settings in Win are set to "Höchstleistung" (Maximum Performance), I checked the minimum CPU-Frequency Mark, it is 100% on Battery and AC, but the Cpu always stays at 1.2 GHz.
I noticed this issue after upgrading to Win 8.1 (I didnt notice it immediately, so im not sure it is Win 8.1) but 1 month ago all cores ran at 100%.
Thanks for any advice!
SOLVED!
On my Samsung laptop the "silent" option was switched on in the settings app, this reduces the CPU power regardless of the current Windows energy-saving options. Setting the option to off solved my problem.
Thanks anyway for all contributions!
I have just recently installed Windows 8, and I tried to compile and build a simple c++ game project in VS 2010, but when I did, it was running at 5 fps. On windows 7, it runs at a solid 60 fps. Nothing has been changed in the code, but there is just horrible slow down.
I have updated my video drivers, but there is still horrible lag. I thought the problem was to do with compatibility issues with windows 8 and OpenGL, but I can't find anything to confirm this. I was wondering if anyone else has had this problem, and if you have solved it.
I would recommend you test your graphics card / drivers first. All sorts of driver issues could arise when you upgrade operating systems. One of the best tests would be to download Cinebench and see how it performs. Cinebench will evaluate your OpenGL performance. If you get poor results, then you know it's a hardware / driver issue and not an issue with your application.
If the Cinebench results are good, then you can move on to the recommendations made by #Robert Rouhani (comments).
http://www.maxon.net/products/cinebench/overview.html
What sort of video card do you have in the Win8 machine?
If it's a laptop you might be battling against nVidia Optimus (or an equivalent technology?). Basically programs have to tell the OS in advance that they want to use the video card or they get defaulted to using the low power GPU embedded in the CPU (note: over-simplification).
If this is the case, there's some options in the nVidia control panel to let you create a profile telling the OS to run your app with the discrete GPU, rather than the embedded one.
This is just a general question - I was sitting and waiting for a bit of software to compile (we use Incredibuild here but can still take 10/15 mins) and it got me wondering, does anyone know how long it took to compile Windows XP or Vista?
I did some googling but didn't really find any useful information
OP is asking about Windows:
"There are no other software projects
like this," Lucovsky said, "but the
one thing that's remained constant
[over the years] is how long it takes
to build [Windows]. No matter which
generation of the product, it takes 12
hours to compile and link the system."
Even with the increase in processing
horsepower over the years, Windows has
grown to match, and the development
process has become far more
sophisticated, so that Microsoft does
more code analysis as part of the
daily build. "The CPUs in the build
lab are pegged constantly for 12
hours," he said. "We've adapted the
process since Windows 2000. Now, we
decompose the source [code] tree into
independent source trees, and use a
new build environment. It's a
multi-machine environment that lets us
turn the crank faster. But because of
all the new code analysis, it still
takes 12 hours."
SOURCE
Also see Mark Lucovsky classic presentation on developing Windows NT/2000.
I don't work at Microsoft, so I don't know for sure...
Third-hand information I have is that it takes about a day to complete a Windows build. Which is more or less in line with attempting to build your favorite OSS Operating System from scratch.
Building a modern operating system is a complex and difficult task. The only reason why it doesn't take longer is because companies like Microsoft have build environments setup to help automate integration testings. Thus they can build a system with less manual effort than is involved in most OSS builds.
If you've like to get a feel for what it takes to build an operating system, might I recommend the free eBook: Linux from Scratch
For a more automated build, try Gentoo. Both options should give you a better idea of the Operating System build process.
Ales Holecek, vice president for development in Windows team said that it takes about 16 hours to build Windows 10. And that it's built automatically every day during the night.
It's not built using single machine, of course, but rather using some build farm.
The answers that say 12-24 hours or overnight are almost certainly correct.
Long ago when I was at Microsoft and every time I've heard it since, they build 'every night'. (I used to load daily builds of NT fairly regularly. If I recall correclty, they did a "checked build" weekly or some such.)
Those numbers on the end of the version are (or at least WERE) these daily build increments:
My windows 8.1:
C:\WINDOWS\system32 > ver
Microsoft Windows [Version 6.3.9600]
Dividing 9600 by 365 gives about 26 years of daily builds, or going back from 2013 when 8.1/2012-R2 released, arrives at about 1987 for the start of development on NT with Windows NT 3.1 released in 1993.
Well, try it out yourself: Grab a Gentoo (or other Linux) distro or try out the Singularity project from Microsoft Research. Another interesting alternative is the ReactOS project. Compiling the kernel alone takes (depending on the machine) about the 15 minutes you've waited for your program. Compiling the whole system takes considerably longer!
I remember hearing that Vista took somewhere along the lines of more than a day to build (can't find a reference now though, argh). It has somewhere in the neighborhood of 50 million lines of code to it.
How long it takes will really depend on the build set up, I really doubt that the Vista engineers need a day to build the code even if it would take a day on a single machine.
I work on a project of a similar scale and until recently builds could take up to 12 hours on a shared multiprocessor sun server. Since we have switched to a Linux based build farm a clean build can happen in less than an hour and rebuilds in a few minutes.
It would be interesting to know what set up the Vista guys are using, Linux based build farms seem unlikely... maybe Windows based build farms then :)
I don't know how long is taking to compile XP, but 10/15 minutes is not so big at all.
Our project that include Linux kernel as one of the components (not the biggest) was taking about a hour to compile. We improved this by using ccache and now it's taking only few minutes.
Not exactly the answer to your question but i though it's might be relevant/useful.