|
C++ compile times vary widely depending on the programming paradigm you employ.
If you're doing OOP or procedural, compile types are pretty snappy and statically related to the size of the source.
If you're doing generic programming, particularly with metaprogramming, compile times are function of how much processing you're telling the compiler to do for you during the build. Some systems like The Spirit Framework do complex grammar table computations at compile time. For a LALR(1) table for the Javascript language that could make a compile of that take minutes, easily - maybe 10 depending on the machine.
To err is human. Fortune favors the monsters.
|
|
|
|
|
Are you using precompiled headers? I would expect a little faster than six minutes for a 2MB executable. My main exe is 2.4 MB, and I just compiled it in 22 seconds, although it seems to usually be closer to a minute in my memory. There are over 210 files in it. My machine is an older i7-4720HQ, but was good at the time (and still quite good). Even on my older computer, which did not have nearly the HP, I always got less than 2 minutes I believe. Precompiled headers, properly set up, save a huge amount of time. Or, if you are into reworking it, you may want to look into the new module system, although I haven't seen any guarantees that they will be faster than precompiled headers.
|
|
|
|
|
Do you have an SSD? if not get one and put as much of your tool chain and source code on it.
It will speed anything over a physical drive. Plus what the other ppl said,
Depending on the structure of your project, consider breaking into DLLs so that you only need to build smaller pieces.
|
|
|
|
|
A good point. I've had an SSD since the first time I needed a new laptop and noticed that an SSD was an option. I don't need massive amounts of storage for cat videos.
|
|
|
|
|
englebart wrote: Do you have an SSD? if not get one and put as much of your tool chain and source code on it.
Good point, I went through this thread taking this for granted.
Decades ago (before SSDs started appearing) I had a machine that had a lot more RAM than I could possibly use at the time, so I directed the compiler to a RAM disk for files I generally don't care about (.obj, .pdb, etc). If I'm not mistaken, it was also faster to send all output to the RAM disk, then copy the binaries (.exe, .dll) that I needed to keep back onto a physical drive.
I have to imagine there's some RAM disk driver somewhere that still works on 10/11. I think I last used one on 7.
|
|
|
|
|
Not a problem, that gives you ample time to go make coffee. /s
I assume you have a lot of header files (cross) dependencies.
At some point, you are limited by your hardware.
CI/CD = Continuous Impediment/Continuous Despair
|
|
|
|
|
Without being able to compile on our own systems to compare directly it's hard to say (could you find an OSS project that builds without any config for reference); but your limited system specs indicate a system that was bottom end performance when new several years ago. A newer system would probably be significantly faster.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
|
|
|
|
|
Two things will improve your build time: More memory and using an SSD for your primary drive.
Software Zen: delete this;
|
|
|
|
|
My first full time coding job it took 45 minutes for a build.
Test build you started last night
Code all morning
Everyone starts their builds
Team lunch
Hope you did not have a stupid typo
Test
Code for hours
Start a build
head home
Now I can do an incremental build with hot code replace on an application that is 100 times the size of that first app every few seconds if I want. I definitely prefer the current state!
|
|
|
|
|
Well, first of all, can I post about this. It is after all "Political"
Bram van Kampen
|
|
|
|
|
I think not - see the rules about posting in the lounge. There are some other groups within the codeproject that allow political postings. In general software talents from russia on one side or Ukraine and the rest of the world on the other should not get upset because of what they see in the lounge.
Nick Polyak
|
|
|
|
|
There have been some posts expressing concern for the safety of CodeProject members in Ukraine, but posts that are political will probably get removed.
|
|
|
|
|
You have to consider the reason for the existence of that rule. This is a forum aimed at programming and technology that lives on advertising. So it's a bad thing for the long term existence to be associated with trolling and infighting.
If you get a lot of trolling/fighting in the forums, it will get shut down.
If you look at the post by Codewitch below, it touches the subject, but it doesn't cause any bad blood, so as far as I'm concerned it's ok. (note, I don't have the last word)
So use common sense.
But you have stepped over the line in the past, so if you're unsure, don't post!
|
|
|
|
|
I will try to post it at noon UTC.
|
|
|
|
|
How many letters?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Thinking of using CCleaner on my Windows 10 PC
Any known issues? Does it make a registry backup?
73
|
|
|
|
|
I used CCleaner for many years and they recently have become very aggressive so I too am looking for another registry cleaner.
The less you need, the more you have.
Even a blind squirrel gets a nut...occasionally.
JaxCoder.com
|
|
|
|
|
Thanks for the info. I thought they were a bit annoying so I uninstalled it.
Looking for another one now!
73
|
|
|
|
|
I was using Auslogic but when I upgraded to Windows 11 I get an UAC error that won't allow me to run it. I've been trying to figure out how to get around it but haven't found anything yet.
(It's a pretty good alternative though.
The less you need, the more you have.
Even a blind squirrel gets a nut...occasionally.
JaxCoder.com
|
|
|
|
|
I've been using Wise Registry Cleaner (try the portable edition first) and so far it's been decent. I'm not sure these programs are really needed, but I like to clean up when I've uninstalled a program.
|
|
|
|
|
I second Mike's post - CCleaner got to the point that you wonder why it does not self-delete itself as bloated software
UNfortunately found no replacement...
|
|
|
|
|
I've always believed register cleaners to be little more than snake oil.
Even MS, decades ago, had its own registry cleaner, but it's long dead and buried.
I have zero trust in these apps. If I, as a developer, have my app shovel a crap-ton of entries in the registry, how does a registry cleaner understand the intent behind the data, and how does it decide whether it should be kept or deleted?
It has to boil down to so little data overall that can be safely removed that you'd be hard-pressed to measure any performance gain. And if that's the case, is it worth the risk?
|
|
|
|
|
Thanks for the info. I finally decided...I will not use any registry cleaner at all!
The reason I considered one was because my two year old Win 10 SSD PC is noticeably slower now to boot up, even after cleaning up Startup apps and temporary files.
But it performs well so I can live with that!
73
|
|
|
|
|
Well, if the registry sets up some app to auto-start, that would have a definite impact, but what you need then is something that identifies things that auto-start, not a registry cleaner. The registry is just one location for setting up auto-running apps.
SysInternals has AutoRuns, which is excellent for tracking these down. But, be careful about what you delete with it.
|
|
|
|
|
Thanks for the info. Win 10 settings has a StartUp section which lists
all auto start apps and their relative impact. I don't see anything there that may cause a slow boot. I am not really concerned about it, just curious.
73
|
|
|
|