worldforge/metaserver-ng — comment on commit ad71d6f0153e48661677866a11689dad89e675ce
File:  line 0
By alriddoch:

Cool, thanks for taking criticism well. :) I was a bit worried I had ruffled some feathers as I haven't seen you for a couple of days.

I did some hacking about myself to see what I could improve. The asio headers are massive, and asio.hpp includes them all. I found that only include the ones I really needed like boost/asio/io_service.hpp reduced the compile time a bit. Also it is very rare that you need iostream in a header file. In most cases you can include iosfwd which contains only forward declarations, and is way smaller.

Another big win you get by reducing the number of includes in headers is to cut down rebuild time. Edit one header, and the number of cpp files that have to be rebuilt should be reduced cutting down your build time, and improving the rate at which you can iterate code.