[Feature Request] Enable parallel installation of libaray #19129
Replies: 9 comments 3 replies
-
@MichaelSuen-thePointer, this is already supported, see You can enable it by setting NUMBER_OF_PROCESSORS environment variable. |
Beta Was this translation helpful? Give feedback.
-
@PhoebeHui The So if there are mutliple boost module to be installed, the whole process is still like: download m1-> unpack m1-> parallel build m1-> install m1-> download m2 -> unpack m2 -> parallel build m2 -> install m2 What I wanted is like Not parallel build, but parallel download, unpack and install - vcpkg level, not build system level |
Beta Was this translation helpful? Give feedback.
-
Hmm, in theory this is possible; let me ask the team about it :) |
Beta Was this translation helpful? Give feedback.
-
Apparently this is a Really Hard Problem. @ras0219 has looked into this before, and we may look back into this in the future. |
Beta Was this translation helpful? Give feedback.
-
Hello @strega-nil Do you have any updates about this thread? |
Beta Was this translation helpful? Give feedback.
-
Any updates on this? It would be really helpful to have when the number of required packages becomes big :( |
Beta Was this translation helpful? Give feedback.
-
Any updates on this? |
Beta Was this translation helpful? Give feedback.
-
I strongly second this. I have a few boost libraries, most of them headers only, and it takes about 10 minutes to download all the dependencies... It's slower to install Boost libraries with VCPKG than to build the integrity of Boost. |
Beta Was this translation helpful? Give feedback.
-
+1. I have a project that all together needs 260 packages from vcpkg. I build on a machine with 40 cores. The builds spends more time configuring and linking than anything else, the machine is basically sitting at idle for 5 hours when in theory it could take basically as long as the shortest critical path, which would still be probably an hour or so. But that's still the difference between doing something "today" or "overnight". I wouldn't expect full 100% parallelization all the time on 40 cores but it should be possible to make a set of trees of dependencies and start everything at the bottom in parallel. It might be hard to decide how many projects can start building at once. Dont want to swamp a small CPU with too many things at once. I do some "extreme parallelization" in my own software and start sometimes 60 parallel builds in parallel, and yeah it does make the machine "a little" unresponsive with many times more build threads than cores, but it does also build everything pretty fast :). You could have a "max parallel projects" parameter given to the user and just let us figure it out. We can set the parallel files per build (the -j parameter) too. So we could tweak it so say have max 7 parallel builds of max 20 parallel files on my 40 core machine. worst case it might try to do 140 files at once but on average its probably going to be lower than that as the configuration and linker stage is always single threaded. It will still be faster in the end and usually when I do my build its a "walk away from that machine" situation anyways cause its still quite annoying to use a machine that unpredictably goes between 0 and 100% cpu use for 5 hours |
Beta Was this translation helpful? Give feedback.
-
Installation of boost is very slow, each of its sub-package is downloaded and built sequentially, which cause low cpu usage and low efficiency.
command line
vcpkg install boost
Proposed solution
If vcpkg can enable package level parallel installation, use
vcpkg -j8
likemake -j8
to speed up package installaziton, it would be of great helpBeta Was this translation helpful? Give feedback.
All reactions