Closed knuxyl closed 3 weeks ago
This may be due to a lack of RAM. Compiling with clang requires about 8Gb of RAM; with gcc or msvc, about 4Gb of RAM. Compilation times may increase significantly due to heavy swapping.
Compilation using Github Actions takes about 2 minutes for Linux/gcc; ~4 minutes for Windows/msvc; ~20 minutes for macOS/Apple clang.
It is possible that using C++20 Modules will improve compilation time. This is a guess and I have not experimented with it yet, as not all compilers support it.
This may be due to a lack of RAM. Compiling with clang requires about 8Gb of RAM; with gcc or msvc, about 4Gb of RAM. Compilation times may increase significantly due to heavy swapping.
Compilation using Github Actions takes about 2 minutes for Linux/gcc; ~4 minutes for Windows/msvc; ~20 minutes for macOS/Apple clang.
Well the intel system has 4gb, rk3568 has 8gb, and the rk3588 has 16gb, all using GCC 14. I'm currently trying it again on the N4020 because it crashed during compilation last night. I used make-jnproc
but I'm thinking it may have run out of memory so I'm just building with one thread and so far it's used 3.49/3.67GB. Edit: It's maxing ram usage. It looks like I may have to build on different pc.
Am I missing something though? This program is small and doesn't have many source files. is it pulling in more dependencies during build that I'm not seeing? I didn't look but is there like LTO or some other optimizations enabled that would explain this?
Also thank you to all developers of this. Byobu is slow laggy and cumbersome to use. vtm is so far a perfect replacement.
edit : just went ahead and built on my main pc (7950x3d 96gb ram) and it took less than a minute. for the intel I used CFLAGS="-march=goldmont-plus" and CXXFLAGS="-march=goldmont-plus" and it works perfect.
Thank you for your feedback and kind words!
Am I missing something though? This program is small and doesn't have many source files.
That's right, vtm doesn't have many dependencies, but its codebase is not organized in a standard way. All code is presented as classes entirely in header files without separating declarations and definitions (with only one short cpp file vtm.cpp containing the main() entry point), as opposed to how it is done in regular C++ code with separating declarations in hpp files, definitions in cpp files. This is most likely the main reason for the large amount of RAM consumption during compilation, and perhaps C++20 Modules can help here.
Ok great. Was trying to rule out user error or compiler problems. Thanks! vtm is now on all my server machines and is working perfect.
I have built this on 2 different platforms both running debian testing. Intel N4020 (2 x 1.1GHz) Rockchip RK3568 (4 x A44 1.8GHz)
On the rockchip it took about 30 minutes to compile. On the intel, it's been a little over an hour and is still compiling. Both systems get to
[ 50%] Building CXX object CMakeFiles/vtm.dir/src/vtm.cpp.o
almost instantly and then the wait begins.Is this normal?
Edit: Just tested on a Rockchip RK3588 (8 core) and it took 7 minutes. That still seems like a long time for such a powerful cpu.