Skip to content

Commit

Permalink
chore(cubesql): Set opt-level to 1 in dev debug builds
Browse files Browse the repository at this point in the history
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.)
  • Loading branch information
srh committed Jun 26, 2024
1 parent b6abbb8 commit 831c98a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/cubejs-backend-native/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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", "lib"]

Expand Down

0 comments on commit 831c98a

Please sign in to comment.