Repository navigation
Conversation
Every onnxruntime-web release from 1.21.0 (checked up to 1.30.0) makes WebKit, the Safari engine, use 4.8-7.6 GB on a 60 s file; with 1.22.0 a 10 minute file reached 12 GB and once crashed the page. 1.20.1 stays at about 1 GB on 60 s and 1.8 GB on 600 s, the same as Chromium and Firefox, and is not slower there. All three engines give 370/370 boxes against Python ONNX Runtime on a 600 s file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The WebKit memory problem comes from the JSEP wasm, not from the release: from 1.21.0 on, ort.min.js loads ort-wasm-simd-threaded.jsep.wasm even for the CPU backend. ort.wasm.min.js loads the plain build in every release (1.30.0: 1.2 GB in WebKit on 60 s instead of 5.6 GB), so a later version bump cannot bring the problem back. Stays on 1.20.1: its wasm is the smallest (11 MB; 1.30.0: 14 MB) and it matches Python ONNX Runtime box for box (370/370 on 600 s in WebKit, Chromium and Firefox), where 1.30.0 differs by two boxes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ort.wasm.min.js1.20.1 (wasort.min.js1.22.0). The version appears in two places that must agree: the script URL inmkdocs.ymlandwasmPathsindocs/javascripts/onnx_demo.js. Both have a comment explaining the choice.ort.min.jsloads the JSEP buildort-wasm-simd-threaded.jsep.wasm, even when only the CPUwasmbackend is used. In WebKit, the Safari engine, that build needs 5–7 GB even for 60 s of audio. With 1.22.0, a 10-minute file reached 12 GB, and one run crashed the page.ort.wasm.min.jsloads the plainort-wasm-simd-threaded.wasmin every release, so a later version bump can't bring the problem back.Which WASM build causes it
WebKit 18.2 (Playwright's Ubuntu 20.04 build). Standalone repro page (model plus 60 s of synthetic audio,
executionProviders: ['wasm']), peak RSS:ort.min.js.jsep.wasmort.wasm.min.js.wasmort.min.js.wasmChromium 156 and Firefox 157 use 0.6–0.7 GB with either build. In the demo itself, every
ort.min.jsrelease from 1.21.0 to 1.30.0 used 4.8–7.6 GB on a 60 s file. Turning off the proxy worker made no difference.Results with this branch
The built page in each browser on a 600 s file (an 11 min input, cut to 600 s by the demo), 32 kHz mono, page defaults conf 0.15 and phrase gap 0.05. All three load
onnxruntime-web@1.20.1/dist/ort-wasm-simd-threaded.wasm:For comparison, the same page with 1.30.0
ort.wasm.min.js: 369 boxes in every engine (368 matched), 1.8 GB in WebKit.Test plan
mkdocs build: the built page andonnx_demo.jsonly referenceonnxruntime-web@1.20.1, and the script isort.wasm.min.js🤖 Generated with Claude Code