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

perf: faster jxl decoding #681

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 36 additions & 20 deletions src/sliceview/jxl/Cargo.lock

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

2 changes: 1 addition & 1 deletion src/sliceview/jxl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edition = "2021"
crate-type = ["cdylib", "rlib"]

[dependencies]
jxl-oxide = "0.9.1"
jxl-oxide = "0.10.1"

[profile.release]
lto = true
Expand Down
13 changes: 11 additions & 2 deletions src/sliceview/jxl/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,19 @@

cd "$(dirname "$0")"

docker build .
docker build -f compile.Dockerfile .
docker run \
--rm \
-v ${PWD}:/src \
-u $(id -u):$(id -g) \
$(docker build -q .) \
$(docker build -f compile.Dockerfile -q .) \
/src/build_wasm.sh

docker build -f optimize.Dockerfile .
docker run \
--rm \
-v ${PWD}:/src \
-u $(id -u):$(id -g) \
$(docker build -f optimize.Dockerfile -q .) \
/src/optimize_wasm.sh

File renamed without changes.
Binary file modified src/sliceview/jxl/jxl_decoder.wasm
Binary file not shown.
5 changes: 5 additions & 0 deletions src/sliceview/jxl/optimize.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM jungomi/binaryen:latest@sha256:acff318e72bb2f1b03d902208a239bcf66b65a38539d7cb8798e5cebd46be9c2




4 changes: 4 additions & 0 deletions src/sliceview/jxl/optimize_wasm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash -xve

cd /src
wasm-opt -O3 /src/jxl_decoder.wasm -o /src/jxl_decoder.wasm
Loading