-
Notifications
You must be signed in to change notification settings - Fork 882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Msgpack-CXX depends on boost making it one of the slowest to compile binary serialization methods #1000
Comments
msgpack-c C++ depends on boost from long time ago implicitly. |
I don't understand? so it's not being used but is still required? |
Boost is required. See #982 (comment) |
ah, so why does msgpack-c not need it and msgpack-cxx does? Exactly what part of boost is being used? would the msgpack-cxx team be against a pr to remove it? |
See #982 |
So if I'm understanding your cmake correctly you're only using boost for c++ versions before c++11 only? which means enabling c++11 disables the boost requirement? |
C++ version requires boost. C version is not. |
Solved by #1002. msgpack-c implicitly depends on boost even if MSGPACK_NO_BOOST is defined. |
I want to start this by saying that after using msgpack-cxx for a while I'm blown away at how fast it is in production and how simple its interface is. The problem I'm having is that I'm using Conan to manage dependencies for my project since it requires cross compiling for lots of platform, when I install msgpack-cxx from Conan and it has to build from source I noticed it was taking a long time for what seems like a very lightweight library. When looking through the dependency tree I noted that msgpack-cxx depended on boost, I found this strange because msgpack-c doesn't and compiled so much quicker. So, to prove this is an issue I did a relatively simple test of compiling some more popular c++ binary serialization libraries from source out of Conan and comparing build times.
time conan install capnproto/0.9.1@ --build
capnproto
real 1m54.295s
user 6m31.118s
sys 0m26.593s
time conan install protobuf/3.19.2@ --build
protobuf
real 1m0.287s
user 6m24.776s
sys 0m19.683s
time conan install msgpack-cxx/4.0.3@ --build
msgpack-cxx
real 2m53.061s
user 10m59.155s
sys 0m41.674s
time conan install msgpack-c/4.0.0@ --build
msgpack-c
real 0m3.888s
user 0m1.253s
sys 0m0.275s
As you can see msgpack-cxx comes dead last while msgpack-c comes in a distant first place, btw I did clear the Conan cache after every build so that EVERY dependency would be build from source. msgpack-c being so quick proves my suspicion that it's only slow because it has to compile boost, to prove this again I did the following.
conan install boost/1.78.0 --build
time conan install msgpack-cxx/4.0.3@ --build missing
msgpack-cxx with prebuilt boost
real 0m1.863s
user 0m0.662s
sys 0m0.099s
So my question is, why does msgpack-cxx depend on boost? if msgpack-c doesn't and works fine wouldn't it be easier and lighter to make a c++ style wrapper around msgpack-c? what is msgpack-cxx even using boost for that msgpack-c didn't need it? If someone could point me down the right path I'd be willing to try and make a pr to remove the dependency if it's not to difficult.
The text was updated successfully, but these errors were encountered: