Compiling #KDE #Plasma from sources on a 20-core i7-12700F results in a lot of idle cpu time due to single-threaded tasks: git pull, cmake, make install... 😕
Conversation
Notices
-
Bernie (codewiz@mstdn.io)'s status on Saturday, 30-Jul-2022 08:48:22 UTC
Bernie
-
Bernie (codewiz@mstdn.io)'s status on Saturday, 30-Jul-2022 08:54:49 UTC
Bernie
I don't think using ninja vs GNU make would make any difference... those gaps occur while neither is running.
But it seems cmake is single-threaded and quite slow.
-
Bernie (codewiz@mstdn.io)'s status on Saturday, 30-Jul-2022 08:58:27 UTC
Bernie
Perhaps #KDE should coalesce most of its frameworks into a monolithic repo.
Distros can continue packaging the resulting libs into a gazillion separate modules, if they want to (but don't see the point, given that most kf5 libs are required by the core desktop anyway).
-
Bernie (codewiz@mstdn.io)'s status on Saturday, 30-Jul-2022 09:04:21 UTC
Bernie
Total build time: 29 minutes. Not bad!
I disabled building Qt 5 from sources because the system version is fine.
-
Bernie (codewiz@mstdn.io)'s status on Saturday, 30-Jul-2022 09:19:34 UTC
Bernie
I tried adding `cmake-generator Ninja` in my kdesrc-buildrc, but it produces much larger rules.
For instance, the build.ninja for kwin is 12MB, while the combined size of all Makefiles was only 5MB.
Both make and ninja are smart enough to keep respawning g++ instances until all cores are busy.
-
Bernie (codewiz@mstdn.io)'s status on Saturday, 30-Jul-2022 17:23:23 UTC
Bernie
@eliasp That's true, kdesrc-build knows the dependency graph and could parallelize more.
Two parallel make instances should still be able to coordinate to avoid spawning too many compilers at once:
https://www.gnu.org/software/make/manual/html_node/Job-Slots.html -
Elias Probst (eliasp@mastodon.social)'s status on Saturday, 30-Jul-2022 17:23:25 UTC
Elias Probst
@codewiz most of KDE was a giant monorepo once - kdelibs. There are many good reasons why it's been split up. Building multiple pkgs in parallel could help avoiding those idle gaps.
In conversation permalink -
Bernie (codewiz@mstdn.io)'s status on Saturday, 30-Jul-2022 17:31:29 UTC
Bernie
@Tanuki Yes, but the thing that's slow and single-threaded is cmake itself, when it reads and executes all the CMakeLists.txt files to generate the Makefiles.
In conversation permalink -
Tanuki (tanuki@mastodon.social)'s status on Saturday, 30-Jul-2022 17:31:30 UTC
Tanuki
@codewiz are you already doing :
cmake --build . -j20 # where 20 is the number of parallel build jobs
In conversation permalink -
Tenno Seremel, La ĉiela ombro (tennoseremel@mstdn.io)'s status on Friday, 05-Aug-2022 10:25:24 UTC
Tenno Seremel, La ĉiela ombro
@codewiz kf5 libs can be used by other programs, which are not a part of KDE.
In conversation permalink
-