Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve C++ SDK perf 5x by respecting CMAKE_BUILD_TYPE and enabling mimalloc #4094

Merged
merged 12 commits into from
Oct 31, 2023
20 changes: 14 additions & 6 deletions rerun_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,12 @@ if(RERUN_DOWNLOAD_AND_BUILD_ARROW)
set(DARROW_CXXFLAGS "")
endif()

if(NOT CMAKE_BUILD_TYPE)
set(ARROW_CMAKE_BUILD_TYPE Release)
else()
set(ARROW_CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE})
endif()

ExternalProject_Add(
arrow_cpp
PREFIX ${ARROW_DOWNLOAD_PATH}
Expand All @@ -168,18 +174,20 @@ if(RERUN_DOWNLOAD_AND_BUILD_ARROW)
GIT_PROGRESS true
CMAKE_ARGS
--preset ninja-debug-minimal
-DARROW_IPC=ON
-DARROW_BOOST_USE_SHARED=OFF
-DARROW_BUILD_SHARED=${ARROW_BUILD_SHARED}
-DARROW_BUILD_STATIC=${ARROW_BUILD_STATIC}
-DCMAKE_INSTALL_PREFIX=${ARROW_DOWNLOAD_PATH}
-DARROW_CXXFLAGS=${DARROW_CXXFLAGS}
-DARROW_IPC=ON
-DARROW_JEMALLOC=OFF
-DARROW_MIMALLOC=ON
emilk marked this conversation as resolved.
Show resolved Hide resolved
-DARROW_USE_ASAN=OFF
-DARROW_USE_TSAN=OFF
-DARROW_USE_UBSAN=OFF
-DARROW_JEMALLOC=OFF
-Dxsimd_SOURCE=BUNDLED
-DBOOST_SOURCE=BUNDLED
-DARROW_BOOST_USE_SHARED=OFF
-DARROW_CXXFLAGS=${DARROW_CXXFLAGS}
-DCMAKE_BUILD_TYPE=${ARROW_CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX=${ARROW_DOWNLOAD_PATH}
-Dxsimd_SOURCE=BUNDLED
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should sort these defines if their order doesn't matter

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR sorts them.

SOURCE_SUBDIR cpp
BUILD_BYPRODUCTS ${ARROW_LIBRARY_FILE}
)
Expand Down
Loading