libprotobuf.lib, 29mb?

209 views
Skip to first unread message

Alex Black

unread,
Jul 2, 2009, 8:33:17 PM7/2/09
to Protocol Buffers
I'm on windows, using Visual Studio 2008 SP1, compiling a Release x64
build of libprotobuf. The lib file is 29,570KB big, is that
expected?

I'm using the provided visual studio projects, but I added the x64
configuration to them, perhaps I have some options set incorrectly or
something.

(The debug lib is 33,575KB)

thanks!

- Alex

Kenton Varda

unread,
Jul 2, 2009, 8:55:56 PM7/2/09
to Alex Black, Protocol Buffers
On Thu, Jul 2, 2009 at 5:33 PM, Alex Black <al...@alexblack.ca> wrote:
I'm on windows, using Visual Studio 2008 SP1, compiling a Release x64
build of libprotobuf.  The lib file is 29,570KB big, is that
expected?

I was going to say "no way", but sure enough, the 32-bit release build is 18,154k, so 64-bit could easily be double that.  However, when you actually link a binary with the library, the size is much smaller.  protoc.exe, for example, is 1MB, and it includes both libprotobuf.lib and libprotoc.lib, the latter of which is 10MB.

I don't know much about MSVC, but perhaps it is including some sort of debug info in this library?  Cygwin produces a 14MB libprotobuf.a, but after stripping it is down to 968k.

Note that I consider 1MB to be too big for many users, which is why the next version will have a "lite" mode that sheds all the descriptors and reflection features and should be very small.

Alex Black

unread,
Jul 2, 2009, 10:29:58 PM7/2/09
to Kenton Varda, Protocol Buffers
Thanks Kenton, thats reassuring.


From: Kenton Varda [mailto:ken...@google.com]
Sent: Thursday, July 02, 2009 8:56 PM
To: Alex Black
Cc: Protocol Buffers
Subject: Re: libprotobuf.lib, 29mb?

Reply all
Reply to author
Forward
0 new messages