Reputation: 235
I have root state machine with about 40 transitions (including four substate machines). All worked well, but when i start raising number of transitions compilation time is significantly increased (development of large state-machine become hell). I tried to use boost::msm::back::favor_compile_time policy, and split submachines to muliple translation units, but it does not have effect. Anybody have some workaround about this problem? Boost - 1.53, Compiler - MSVC 2012, Processor - Intel i7
Upd: Best way to reduce time - remove boost msm from project
Upvotes: 5
Views: 994
Reputation: 393174
"but it does not have effect"
I think the idea is that splitting across TUs speeds things up /because/ you don't always need to rebuild the TUs, not necessarily that a clean rebuild would be quicker.
In fact, I'd expect a (non-parallellized) build to be slower for more TUs, because each TU ends up including 99% of the same code in headers. Pre-compiled headers can alleviate this somewhat.
In this respect, adding the relevant headers (and pre-processor #define
s) to stdafx could help.
Upvotes: 3