Skip to content

[C++] Reduce shared library / binary code size (umbrella issue) #25094

Description

@asfimport

We're reaching a point where we may need to be careful about decisions that increase code size:

  • Instantiating too many templates for code that isn't performance sensitive, or where some templates may do the same thing (e.g. Int32Type kernels may do the same thing as a Date32Type kernel)

  • Inlining functions that don't need to be inline

    Code size tends to correlate also with compilation times, but not always.

    I'll use this umbrella issue to organize issues related to reducing compiled code size

    At this moment (2020-05-27), here are the 25 largest object files in a -O2 build

    524896src/arrow/CMakeFiles/arrow_objlib.dir/array/builder_dict.cc.o531920src/arrow/CMakeFiles/arrow_objlib.dir/filesystem/s3fs.cc.o552000src/arrow/CMakeFiles/arrow_objlib.dir/json/converter.cc.o575920src/arrow/CMakeFiles/arrow_objlib.dir/csv/converter.cc.o595112src/arrow/CMakeFiles/arrow_objlib.dir/compute/kernels/scalar_cast_string.cc.o645728src/arrow/CMakeFiles/arrow_objlib.dir/type.cc.o683040src/arrow/CMakeFiles/arrow_objlib.dir/compute/kernels/scalar_set_lookup.cc.o702232src/arrow/CMakeFiles/arrow_objlib.dir/ipc/reader.cc.o729912src/arrow/CMakeFiles/arrow_objlib.dir/tensor/coo_converter.cc.o752776src/arrow/CMakeFiles/arrow_objlib.dir/tensor/csc_converter.cc.o752776src/arrow/CMakeFiles/arrow_objlib.dir/tensor/csr_converter.cc.o877680src/arrow/CMakeFiles/arrow_objlib.dir/array/dict_internal.cc.o885624src/arrow/CMakeFiles/arrow_objlib.dir/builder.cc.o919072src/arrow/CMakeFiles/arrow_objlib.dir/scalar.cc.o941776src/arrow/CMakeFiles/arrow_objlib.dir/ipc/json_internal.cc.o1055248src/arrow/CMakeFiles/arrow_objlib.dir/ipc/json_simple.cc.o1233304src/arrow/CMakeFiles/arrow_objlib.dir/compute/kernels/scalar_compare.cc.o1265160src/arrow/CMakeFiles/arrow_objlib.dir/sparse_tensor.cc.o1343480src/arrow/CMakeFiles/arrow_objlib.dir/tensor/csf_converter.cc.o1346928src/arrow/CMakeFiles/arrow_objlib.dir/array.cc.o1502568src/arrow/CMakeFiles/arrow_objlib.dir/compute/kernels/vector_hash.cc.o1609760src/arrow/CMakeFiles/arrow_objlib.dir/compute/kernels/scalar_cast_numeric.cc.o1794416src/arrow/CMakeFiles/arrow_objlib.dir/array/diff.cc.o2759552src/arrow/CMakeFiles/arrow_objlib.dir/compute/kernels/vector_filter.cc.o7609432src/arrow/CMakeFiles/arrow_objlib.dir/compute/kernels/vector_take.cc.o

Reporter: Wes McKinney / @wesm
Assignee: Wes McKinney / @wesm

Related issues:

Note: This issue was originally created as ARROW-8970. Please see the migration documentation for further details.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions