tpie icon indicating copy to clipboard operation
tpie copied to clipboard

Make OS headers included only in .cpp files

Open Mortal opened this issue 10 years ago • 2 comments

We should see if it is possible to avoid including Windows.h in all TPIE headers

Mortal avatar Mar 27 '14 06:03 Mortal

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.

Mortal avatar Apr 01 '14 13:04 Mortal

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?

SSoelvsten avatar Jul 27 '22 11:07 SSoelvsten