why my code compile so slowly?

110 views
Skip to first unread message

Terry

unread,
Aug 23, 2011, 9:22:03 AM8/23/11
to The C++ Network Library
hi, everyone

I use cpp-netlib v0.9.1 and try to build the helloworld sample code.
i define the BOOST_NETWORK_NO_LIB macro, so the compiler does not need
the lib file.
my env is windows xp, visual studio 2008. boost 1.45.
but the cpp file compiles very very slowly and the cl process use
about 1GB memory.
Is there any way to make it compile fast?

Terry Ma

Glyn Matthews

unread,
Aug 23, 2011, 5:34:56 PM8/23/11
to cpp-n...@googlegroups.com
Hi Terry,

Originally, cpp-netlib was designed to be header only but, as you're experiencing, compile times soon became too long for many users.  Recently, we've been moving code to libraries to get around this problem - hence the definition of the BOOST_NETWORK_NO_LIB macro that allows the possibility to stay header-only for those who want it.  If you want a faster compile time, you must not define this macro and link to the libraries.
 
Glyn

Terry

unread,
Aug 23, 2011, 8:40:16 PM8/23/11
to The C++ Network Library
Glyn
thank you for your reply.

i now make my code link to the cppnetlib-uri-parsers.lib.
and the compile time is faster than before.
but, i still think it too long to be acceptable.

Dean Michael Berris

unread,
Aug 23, 2011, 8:47:29 PM8/23/11
to cpp-n...@googlegroups.com
On Wed, Aug 24, 2011 at 10:40 AM, Terry <zju...@gmail.com> wrote:
> Glyn
> thank you for your reply.
>
> i now make my code link to the cppnetlib-uri-parsers.lib.
> and the compile time is faster than before.
> but, i still think it too long to be acceptable.
>

Thanks Terry, we're acutely aware of this and will be making
improvements soon. Hopefully you'll try them out when it makes it into
the next version (0.10) which should be out either next week or the
week after that.

Cheers

--
Dean Michael Berris
Technical Solutions Engineer
Google

Reply all
Reply to author
Forward
0 new messages