-
Notifications
You must be signed in to change notification settings - Fork 68
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
Massive compilation time degradation when upgrading to libBoost 1.68 #76
Comments
Thanks for reporting this. The solution I can thing of is to offer a macro that a user can choose to define, which disables the generation of member functions |
Yes it would. But to be honest in project we are taking actions to get rid of boost::optional. |
Any idea, why those functions slow down compilation so much? Shouldn't template member functions only be generated by the compiler if they are used? |
Not 100% sure but it may be connected with debug symbols on GCC (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86964) Some tests were also done on GCC 9, and there such big slow down isn't visible. |
Changed the implementation for |
After upgrading to libBoost 1.68 our compilation time of our project (3.1 m lines) deceased dramatically from ~45 min to ~1h 10min.
Deeper investigation points to this commit:
Compilation time of single file changes from 0m35.891s to 1m29.625s.
Same file compiled under other versions:
Our project heavily utilize boost::optional.
Tested on GCC 6.4 and GCC 8.
Commenting out "flat_map" methods reduces compilation time from 1m31.631s to 0m35.455s, commenting out additionally "map" method reduces compilation time even more back to 1.67 level (0m27.002s).
Please optimize these functions or add ability to exclude them from compilation.
The text was updated successfully, but these errors were encountered: