From: Dean M. B. <mik...@gm...> - 2010-10-26 04:34:18
|
On Tue, Oct 26, 2010 at 2:59 AM, Glyn Matthews <gly...@gm...> wrote: > Hi, > > On 25 October 2010 16:32, Nelson, Erik - 2 <eri...@ba...> > wrote: >> >> > Dean Michael Berris wrote on Monday, October 25, 2010 >> >> > Now there are still a lot of other things I can do to start reducing >> > compile-times. One is incorporating precompiled headers into the >> > build, and start pre-compiling almost every single header in the >> > library. >> >> Pre-compiled headers seem like they are going to be a mess, and >> conceptually similar to going to a non-header-only implementation. I >> like the idea of header-only, but maybe a more library-based one would >> help the compile time. > > I agree with this point. IMO, although I agree that the header-only > approach has merits, it seems that since we're already requiring that users > link against Boost's system, regex and date_time libraries, we don't seem to > be gaining much from this approach anyway. Actually, I'll work on removing the dependency on Boost.Regex soon and use Boost.Xpressive instead to remove the link-time requirement to it. Date_time also has an option to inline everything (IIRC) while Boost.System will get a macro option to "inline" it. So pretty soon cpp-netlib can really be header-only depending on Boost. > Including the compile time > problem and making cpp-netlib strictly being header-only has very few > benefits. I would suggest a better use of our focus should be on > portability. Yeah, the compile time problem is really brought in by Boost.Spirit's Qi (and consequently Boost.Fusion and Boost.Proto). Although it is portable already as it is now, right? > Additionally, I have been doing a lot of development in embedded systems, > where the long compile times and large binaries that are generated pretty > much rules out using cpp-netlib. This is a shame, because this is an area > where cpp-netlib can provide a lot of benefits to developers. > Are you not stripping the binaries created by cpp-netlib? In Debug mode, yes you will have problems with the debugging symbols eating up the output binary. Also, since we still depend on Boost.Lexical_cast that does depend on the STL io streams library, that will cause the binaries to be pretty large. We might want to try using Jeroen's construe_cast in places where we use lexical_cast. The long compile times can really be addressed by precompiled headers especially if you're using GCC. Clang, well not so much because precompiled headers support is still a little ... well... iffy at this time. :D >> >> > Has anyone played around with CMake and how to make precompiled >> > headers part of the build process? I have seen some Google results on >> > the matter but I currently have no time/patience to muck around with >> > that. >> > >> >> Nothing else in Boost requires CMake, as far as I know. Boost-devel has >> had some rumblings about a change, but right now Boost.Build is the >> Boost standard. > > Sadly ;) > Yeah, it is sad. :D >> >> > I'm nearing the completion of the asynchronous server that invokes >> > request handlers in a thread pool and although the compile times have >> > been reduced in the HTTP client side of things I would really >> > appreciate some CMake kung-fu from people on the list to incorporate >> > precompiled-headers (so that we can make that part of the install step >> > in 0.8). >> > >> >> Compile time *is* an important issue, but the beauty of a header library >> is that there is no install step- you just copy the files into your >> directory tree. > > But there is an install step, because of the dependencies that cpp-netlib > has - and will have: in developing the XMPP client I'll be linking to an XML > parser library and TLS library. Other protocol implementations will bring > other dependencies and we'll have to deal with those too. Yeah, this is going to be the test of having an install step. :D > Regards, Thanks for the comments Glyn, hope mine help convince you that precompiled headers and changes to cpp-netlib will be good for users (and embedded systems). :) -- Dean Michael Berris deanberris.com |