« first day (1690 days earlier)      last day (1146 days later) » 

9:34 AM
Hi all
Has anyone ever tried to isolate boost signals2 into a PIMPL design?
We're facing long compile times with boost/signals2 in one of the core headers and signal functionality being spread throughout the project
I'm measuring the exact effect right now, having removed signal usage entirely for a test build
But 2 different build time analyzer tools have clearly indicated that boost signals2 are to blame
 
nwp
9:52 AM
It makes me sad when code is optimized for compile times.
 
C++ compile times make me a lot sadder than that
 
@nwp Well, there is a limit to available hardware
So, back to the point, is there a way to abstract away boot signals2?
The thing is that you need a connection object, and you have to return it to allow clients to subscribe to it
This means including the header is inevitable
 
nwp
10:14 AM
Sure you can, especially if you only need simple functionality like sending and receiving data.
Regular PIMPL is an option.
 
@nwp Let me clarify, I'd prefer to keep boost signals2, not write an in-house library
I believe thread safety is important in our usecase
 
nwp
If signals2 does what you want you can expose the functionality you need and implement it via signals2 so you save the compilation time via PIMPL. If it doesn't you'll have to find a different library or write it anyways.
 
Have you ever come across such a pimpl solution for signals2?
I'm concerned about having to expose the connection object, in particular
 
nwp
@iksemyonov I haven't. You can probably find implementations on Github, but doing it yourself is probably much easier.
 

« first day (1690 days earlier)      last day (1146 days later) »