tpie
tpie copied to clipboard
Make OS headers included only in .cpp files
We should see if it is possible to avoid including Windows.h in all TPIE headers
I have done some cleanup in branch windows_h
after analyzing TPIE and Boost header includes using a small Python program. Mainly, I discovered that sysinfo.h might indirectly include ws2tcpip.h
(a Windows API header) through boost/asio/ip/host_name.hpp
, so I moved that include into sysinfo.cpp.
Unfortunately, a single speed comparison of compile time before and after cleanup on the machine bbq
do not demonstrate a significant speedup, but it means that applications using TPIE do not need to include Windows.h whenever they include a TPIE header, which is nice.
Before cleanup: 45 s to build libtpie, 181 s to build the rest (3:46 in total), all tests passing
After cleanup: 45 s to build libtpie, 171 s to build the rest (3:36 in total), all tests passing.
The branch windows_h was never merged with master as far as I can tell and is now more than 1200 commits behind. Maybe said branch and this issue should be closed?