From 8961447f0f539010a6eccbd73efbefc37be8a440 Mon Sep 17 00:00:00 2001 From: Sam Hughes Date: Sun, 16 Jun 2024 15:33:29 -0700 Subject: [PATCH] chore(cubesql): Set opt-level to 1 in dev debug builds This avoids stack overflows in datafusion, caused by very inefficient Rust stack layout in opt-level 0, that makes the sql_expr_to_logical_expr function, called recursively, use 50KB stack frames. (Some other functions use 90KB or over 100KB, as well.) --- packages/cubejs-backend-native/Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/cubejs-backend-native/Cargo.toml b/packages/cubejs-backend-native/Cargo.toml index 5af56959fe688..df0bb63b33a7f 100644 --- a/packages/cubejs-backend-native/Cargo.toml +++ b/packages/cubejs-backend-native/Cargo.toml @@ -9,6 +9,9 @@ documentation = "https://cube.dev/docs" homepage = "https://cube.dev" exclude = ["index.node"] +[profile.dev] +opt-level = 1 + [lib] crate-type = ["cdylib"]