Skip to content

Commit

Permalink
Add release profile for optimizing perf and size (#523)
Browse files Browse the repository at this point in the history
* Add release-opt profile, remove unused flags/deps

* add profile for minimizing size

* Fix tests
  • Loading branch information
jonmmease authored Oct 19, 2024
1 parent 96ca282 commit 191b62a
Show file tree
Hide file tree
Showing 9 changed files with 1,058 additions and 2,113 deletions.
5 changes: 1 addition & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 31 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,38 +40,67 @@ default-features = false

[workspace.dependencies.datafusion]
version = "42.0.0"
default-features = false
features = ["parquet", "nested_expressions"]

[workspace.dependencies.datafusion-common]
version = "42.0.0"
# no default features

[workspace.dependencies.datafusion-expr]
version = "42.0.0"
# no default features

[workspace.dependencies.datafusion-proto]
version = "42.0.0"
default-features = false
features = ["parquet"]

[workspace.dependencies.datafusion-proto-common]
version = "42.0.0"
default-features = false

[workspace.dependencies.datafusion-physical-expr]
version = "42.0.0"
default-features = false

[workspace.dependencies.datafusion-optimizer]
version = "42.0.0"
default-features = false

[workspace.dependencies.datafusion-functions]
version = "42.0.0"
default-features = false

[workspace.dependencies.datafusion-functions-nested]
version = "42.0.0"
# no default features

[workspace.dependencies.datafusion-functions-aggregate]
version = "42.0.0"
# no default features

[workspace.dependencies.datafusion-functions-window]
version = "42.0.0"
# no default features

# Profile with good speed for local development and testing
[profile.release]
## Tell `rustc` to use highest performance optimization and perform Link Time Optimization
opt-level = 3
# lto = true

# Profile optimized for speed and small size,
# but takes a long time to compile
[profile.release-opt]
inherits = "release"
opt-level = 3
codegen-units = 1
lto = "fat"
strip = "debuginfo"

# Profile optimized for minimizing size for wasm builds
# Unfortunately, wasm-pack can't use this directly yet.
# See https://github.com/rustwasm/wasm-pack/issues/1111
[profile.release-small]
inherits = "release"
opt-level = "z"
codegen-units = 1
3,106 changes: 1,016 additions & 2,090 deletions pixi.lock

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ pip = "23.2.1.*"
voila = "0.5.0.*"
tenacity = "8.2.3.*"
pytest-cov = "4.1.0.*"
flaky = "3.7.0.*"
vega_datasets = "0.9.0.*"
jupytext = "1.15.0.*"
openjdk = "20.0.0.*"
Expand All @@ -131,8 +130,7 @@ ruff = ">=0.6.9,<0.7"
mypy = ">=1.11.2,<2"
pixi-pycharm = ">=0.0.8,<0.0.9"
scipy = "1.14.1.*"
pandas = ">=2.2.3,<3"
pyarrow = ">=13.0.0,<14"
flaky = ">=3.8.1,<4"

# Dependencies are those required at runtime by the Python packages
[dependencies]
Expand All @@ -156,3 +154,6 @@ jpeg = "9e.*"
giflib = "5.2.1.*"
libglib = "2.76.4.*"
glib = "2.76.4.*"

[pypi-dependencies]
pyarrow = "==16"
6 changes: 5 additions & 1 deletion vegafusion-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ workspace = true

[dependencies.datafusion-functions]
workspace = true
features = ["core_expressions", "string_expressions", "datetime_expressions", "hashbrown"]

[dependencies.datafusion-functions-nested]
workspace = true

[dependencies.datafusion-proto]
workspace = true
Expand Down Expand Up @@ -69,4 +73,4 @@ optional = true

[dependencies.object_store]
workspace = true
optional = true
optional = true
3 changes: 0 additions & 3 deletions vegafusion-datafusion-udfs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,5 @@ version = "1.6.9"
path = "../vegafusion-core"
version = "1.6.9"

[dependencies.datafusion-physical-expr]
workspace = true

[dependencies.datafusion-functions]
workspace = true
5 changes: 1 addition & 4 deletions vegafusion-python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ workspace = true

[dependencies.vegafusion-common]
path = "../vegafusion-common"
features = ["pyo3", "proto", "base64"]
features = ["pyo3", "base64"]
version = "1.6.9"

[dependencies.vegafusion-core]
Expand All @@ -70,9 +70,6 @@ features = ["datafusion-conn"]
path = "../vegafusion-dataframe"
version = "1.6.9"

[dependencies.datafusion-proto]
workspace = true

[dependencies.tokio]
workspace = true
features = ["macros", "rt-multi-thread"]
Expand Down
3 changes: 0 additions & 3 deletions vegafusion-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ workspace = true
[dependencies.prost]
workspace = true

[dependencies.prost-types]
workspace = true

[dependencies.uuid]
version = "^1.2"
features = ["v4"]
Expand Down
3 changes: 0 additions & 3 deletions vegafusion-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ wasm-bindgen-test = "0.3.13"
[dependencies.prost]
workspace = true

[dependencies.prost-types]
workspace = true

[dependencies.futures]
workspace = true

Expand Down

0 comments on commit 191b62a

Please sign in to comment.