mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-21 09:00:35 +00:00
Merged patch series from Avi Kivity: boost/multiprecision is a heavyweight library, pulling in 20,000 lines of code into each header that depends on it. It is used by converting_mutation_partition_applier and types.hh. While the former is easy to put out-of-line, the latter is not. All we really need is to forward-declare boost::multiprecision::cpp_int, but that is not easy - it is a template taking several parameters, among which are non-type template parameters also defined in that header. So it's quite difficult to disentangle, and fragile wrt boost changes. This patchset introduces a wrapper type utils::multiprecision_int which _can_ be forward declared, and together with a few other small fixes, manages to uninclude boost/multiprecision from most of the source files. The total reduction in number of lines compiled over a full build is 324 * 23,227 or around 7.5 million. Tests: unit (dev) Ref #1 https://github.com/avikivity/scylla uninclude-boost-multiprecision/v1 Avi Kivity (5): converting_mutation_partition_applier: move to .cc file utils: introduce multiprecision_int tests: cdc_test: explicitly convert from cdc::operation to uint8_t treewide: use utils::multiprecision_int for varint implementation types: forward-declare multiprecision_int configure.py | 2 + concrete_types.hh | 2 +- converting_mutation_partition_applier.hh | 163 ++------------- types.hh | 12 +- utils/big_decimal.hh | 3 +- utils/multiprecision_int.hh | 256 +++++++++++++++++++++++ converting_mutation_partition_applier.cc | 188 +++++++++++++++++ cql3/functions/aggregate_fcts.cc | 10 +- cql3/functions/castas_fcts.cc | 28 +-- cql3/type_json.cc | 2 +- lua.cc | 38 ++-- mutation_partition_view.cc | 2 + test/boost/cdc_test.cc | 6 +- test/boost/cql_query_test.cc | 16 +- test/boost/json_cql_query_test.cc | 12 +- test/boost/types_test.cc | 58 ++--- test/boost/user_function_test.cc | 2 +- test/lib/random_schema.cc | 14 +- types.cc | 20 +- utils/big_decimal.cc | 4 +- utils/multiprecision_int.cc | 37 ++++ 21 files changed, 627 insertions(+), 248 deletions(-) create mode 100644 utils/multiprecision_int.hh create mode 100644 converting_mutation_partition_applier.cc create mode 100644 utils/multiprecision_int.cc