Open Mm2PL opened 2 years ago
I compiled things and it only compiled the files that were modified, because of like, idk cache or it checked what changed or something.
With AppVeyor it would have taken longer, because it compiles all the files again.
With AppVeyor it would have taken longer, because it compiles all the files again.
Yes. The compile times I'm talking about in this issue are compiling everything from scratch, exactly like AppVeyor. Incremental builds are a lot faster.
With AppVeyor it would have taken longer, because it compiles all the files again.
Yes. The compile times I'm talking about in this issue are compiling everything from scratch, exactly like AppVeyor. Incremental builds are a lot faster.
I'm compiling a Release version from a branch from scratch now on AppVeyor to see how long it takes there.
With AppVeyor it would have taken longer, because it compiles all the files again.
Yes. The compile times I'm talking about in this issue are compiling everything from scratch, exactly like AppVeyor. Incremental builds are a lot faster.
I'm compiling a Release version from a branch from scratch now on AppVeyor to see how long it takes there.
So a later build took 6 min 23 sec until it said "Build success", and another later build took 6 min 46 sec
The one I just made took 7 min 28 sec
With AppVeyor it would have taken longer, because it compiles all the files again.
Yes. The compile times I'm talking about in this issue are compiling everything from scratch, exactly like AppVeyor. Incremental builds are a lot faster.
I'm compiling a Release version from a branch from scratch now on AppVeyor to see how long it takes there.
So a later build took 6 min 23 sec until it said "Build success", and another later build took 6 min 46 sec
The one I just made took 7 min 28 sec
I ran right another one after the last one finished and it took 7 min 38 sec
though I think the ones from Visual Studio, also without the cache, build quicker, though I could be wrong. Not sure about the hardware on AppVeyor.
Reference in n
and another one I just ran took 7 min 36 sec
I'm sure there's a bit of work that could be done on c2's side to improve compile times, but nothing's gonna get you around the specs of a GH runner unless you use a self-hosted one. Might be worth looking into.
From the duplicate issue:
Clangs --ftime-trace is useful for figuring out ways to reduce compile time
Otherwise upgrading the build infra to more cores
Clangs --ftime-trace is useful for figuring out ways to reduce compile time
On Windows for MSVC, you can use microsoft/vcperf and the Windows Performance Analyzer (about 700 MiB).
To compile, you need to have [`nuget`](https://nuget.org/downloads) installed. Open a terminal with Visual Studio environment variables, and run the following commands: ```cmd git clone https://github.com/microsoft/vcperf.git cd vcperf nuget restore msbuild /property:Configuration=Release ``` The resulting `vcperf.exe` will be in `out/Release/x64`.
I've done a -ftime-trace
analysis with ClangBuildAnalyzer with a debug build and release build. The numbers are a little different, probably because of linux caching the files in ram. Also of note I am on Linux, so possibly expensive windows stuffs aren't included.
I've taken care to disable ccache:
I edited the PCH to speed up some header-only libraries (debug, no cache; about 4min30s down to 3min45s).
Headers using websocketpp
and boost/asio
still really stand out. They're taking much longer to include (avg. 20-25s on my machine) and can't be added to the PCH, because they include Windows.h
(this causes funny compilation errors). Maybe these headers should use PIMPL or similar, so only the translation unit would need to include these header-only libraries? The next most expensive headers for me were wintoastlib.h
(11s) and windows.ui.notifications.h
(7s).
I realize this may not be super helpful but here's a link to an article by one of the Blender devs on common techniques to improve C++ build times: https://devtalk.blender.org/t/speed-up-c-compilation/30508
Checklist
Describe your issue
Guys, we've got an issue in the form of compile times. It takes ~7 minutes for CI (which has decent computing power) to compile Chatterino. While I know that C++ itself has long compile times, it probably is possible to shorten them at least a little.
IMO this issue isn't really a bug neither is it an enhancement, it's a problem we have.
Screenshots
n/a
OS and Chatterino Version
Since a long time ago xd