Static C++ libraries on Windows are known to be quite large. The
Protocol Buffers static libraries on Windows are over 100MB. The size
is not caused by thirdparty dependencies AFAIK, it's the result of
object code produced by MSVC.

See https://github.com/conda-forge/libprotobuf-feedstock/issues/24 as an example

On Linux these are the largest object code files and directories

$ du -ab src/arrow/CMakeFiles/arrow_objlib.dir/ | sort -n -r | head -n 30
26091568 src/arrow/CMakeFiles/arrow_objlib.dir/
13603208 src/arrow/CMakeFiles/arrow_objlib.dir/compute
13093888 src/arrow/CMakeFiles/arrow_objlib.dir/compute/kernels
6471328 src/arrow/CMakeFiles/arrow_objlib.dir/compute/kernels/take.cc.o
3053736 src/arrow/CMakeFiles/arrow_objlib.dir/ipc
2688040 src/arrow/CMakeFiles/arrow_objlib.dir/array
1907720 src/arrow/CMakeFiles/arrow_objlib.dir/compute/kernels/filter.cc.o
1665648 src/arrow/CMakeFiles/arrow_objlib.dir/array/diff.cc.o
1621984 src/arrow/CMakeFiles/arrow_objlib.dir/compute/kernels/compare.cc.o
1172848 src/arrow/CMakeFiles/arrow_objlib.dir/json
991104 src/arrow/CMakeFiles/arrow_objlib.dir/ipc/json_simple.cc.o
874672 src/arrow/CMakeFiles/arrow_objlib.dir/compute/kernels/hash.cc.o
846608 src/arrow/CMakeFiles/arrow_objlib.dir/compute/kernels/cast.cc.o
828040 src/arrow/CMakeFiles/arrow_objlib.dir/ipc/json_internal.cc.o
779352 src/arrow/CMakeFiles/arrow_objlib.dir/builder.cc.o
702032 src/arrow/CMakeFiles/arrow_objlib.dir/csv
694520 src/arrow/CMakeFiles/arrow_objlib.dir/util
668528 src/arrow/CMakeFiles/arrow_objlib.dir/io
662600 src/arrow/CMakeFiles/arrow_objlib.dir/array.cc.o
509328 src/arrow/CMakeFiles/arrow_objlib.dir/json/converter.cc.o
475752 src/arrow/CMakeFiles/arrow_objlib.dir/array/builder_dict.cc.o
446872 src/arrow/CMakeFiles/arrow_objlib.dir/compute/kernels/isin.cc.o
434768 src/arrow/CMakeFiles/arrow_objlib.dir/type.cc.o
391720 src/arrow/CMakeFiles/arrow_objlib.dir/csv/converter.cc.o
363440 src/arrow/CMakeFiles/arrow_objlib.dir/pretty_print.cc.o
345496 src/arrow/CMakeFiles/arrow_objlib.dir/compute/expression.cc.o
337360 src/arrow/CMakeFiles/arrow_objlib.dir/json/parser.cc.o
334240 
src/arrow/CMakeFiles/arrow_objlib.dir/compute/kernels/sort_to_indices.cc.o
324568 src/arrow/CMakeFiles/arrow_objlib.dir/ipc/writer.cc.o
315760 src/arrow/CMakeFiles/arrow_objlib.dir/ipc/reader.cc.o

If you don't need any code in src/arrow/compute you can pass
-DARROW_COMPUTE=OFF and probably trim the size of the static library a
lot.

On Wed, Sep 4, 2019 at 11:02 AM Francois Saint-Jacques
<fsaintjacq...@gmail.com> wrote:
>
> Hello Ivan,
>
> There's a software called `bloaty` [1] that can tell you the size of
> binary object per symbols.
>
> Thank you,
> François
>
> [1] https://github.com/google/bloaty
>
> On Wed, Sep 4, 2019 at 12:00 PM Ivan Popivanov <ivan.popiva...@gmail.com> 
> wrote:
> >
> > Have been trying to figure out the binary size of a basic arrow static
> > library. Release, on windows, produced static libraries of ~65Mb. The
> > dynamic library however is about 5Mb. Which dlls are bringing the extras in
> > the static - can we cut them off?
> >
> > In other words, are there any switches to turn functionality off - let's
> > say I need only table creation and serialization.
> >
> > Thanks in advance
> > Ivan

Reply via email to