Repository navigation
Conversation
✅ Deploy Preview for webkit-jetstream-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
danleh
force-pushed
the
wasm-kotlin-compose-update
branch
from
November 3, 2026 21:43
bf19e61 to
60e51ff
Compare
Build the Compose Multiplatform benchmarks from upstream master (1574503571, which includes JetBrains/compose-multiplatform#5787 passing -Xwasm-use-new-exception-proposal to the Wasm linkTask) instead of the JetStream 3.0 hotfix branch (ok/jetstream3_hotfix, 84dad4d3f6), overriding compose.version to 1.13.0-beta01. This moves Kotlin from 2.2.20-Beta2 to 2.4.20 (stable), Compose from 1.8.2 to 1.13.0-beta01 (which includes the PR #3411 fix for per-frame JobCancellationException/Error stack allocation in RectManager and PR #3269/#3484 Skia wrapper reuse fixes), and Skiko from a custom 0.9.4.3 build to 0.156.0, while emitting standard WebAssembly exnref (try_table/throw_ref) with zero legacy try/catch instructions. Compiler option added in compiler-options.patch (both on compile and KotlinJsIrLink tasks): - -Xwasm-kclass-fqn=false: Works around KT-91066, where Kotlin 2.3+'s KClassImpl.hashCode() allocates and hashes "$packageName.$typeName" on every call (triggered on every Compose modifier node lookup). Removed workarounds: - The hotfix branch and its custom Skiko build. - use-beta-toolchain.patch: master uses a stable Kotlin (2.4.20). - jstag-workaround.patch: Safari's WebAssembly.JSTag fixes have shipped. - hook-print.patch: Kotlin's glue logs through console, and benchmark.js now silences console.log and console.warn unless verbose is set. - The skipFunMain global in benchmark.js, which nothing reads. Kept, rebased: empty-main-function.patch and skiko-disable-instantiate.patch (updated for Skiko 0.156.0's awaitSkikoCore). Also rewrite static imports in Kotlin 2.4's compose-benchmarks-benchmarks.import-object.mjs via sed in build.sh, instantiate compose-benchmarks-benchmarks.wasm directly in benchmark.js (replacing compose-benchmarks-benchmarks.uninstantiated.mjs), and disable window.caches in benchmark.js so Compose 1.12+'s ResourceWebCache uses the in-memory preload fetch polyfill in browsers just as in JS shells. TODOs once upstream updates ship: - Update CMP_REV to a newer compose-multiplatform commit once Compose 1.13.0 is stable (~mid-December 2026) and drop the explicit -Pcompose.version=1.13.0-beta01 override in build.sh. - Remove compiler-options.patch (-Xwasm-kclass-fqn=false) once KT-91066 is fixed and backported. Part of WebKit#277.
danleh
force-pushed
the
wasm-kotlin-compose-update
branch
from
November 3, 2026 23:41
60e51ff to
d4e293b
Compare
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.
Part of #277. cc @bashor @eymar @terrakok
Build the Compose Multiplatform benchmarks from upstream
master(1574503571) instead of the JetStream 3.0 hotfix branch (ok/jetstream3_hotfix,84dad4d3f6), overridingcompose.versionto1.13.0-beta01. This updates Kotlin from2.2.20-Beta2to2.4.20, Compose from1.8.2to1.13.0-beta01(includingJetBrains/compose-multiplatform-core#3411), and Skiko from a custom0.9.4.3build to0.156.0, and emits standard Wasmexnref(try_table, 0 legacytryinstructions) via JetBrains/compose-multiplatform#5787.To review (9 files, +190/−141; the other 6 files are build output):
use-beta-toolchain.patch,jstag-workaround.patch(WebKit bugs 297126 and 297127, fixed in August 2025),hook-print.patch, and the unusedskipFunMainglobal.empty-main-function.patchandskiko-disable-instantiate.patch.compiler-options.patchpassing-Xwasm-kclass-fqn=falseto work around KT-91066 (KClassImpl.hashCode()allocating"$packageName.$typeName"on every modifier node lookup), asedstep inbuild.shrewriting the staticimportstatements in Kotlin 2.4'scompose-benchmarks-benchmarks.import-object.mjs, direct Wasm instantiation inbenchmark.js(replacing.uninstantiated.mjs), and polyfills/overrides inbenchmark.js(AbortController,Blob,addEventListener/postMessage, and disablingwindow.cachesso Compose 1.12+'sResourceWebCacheuses the in-memorypreloadfetchpolyfill in browsers just as in JS shells).Binaries: 2.67 MB smaller in total (
compose-benchmarks-benchmarks.wasm: 5.65 MB → 5.24 MB;skiko.wasm: 9.72 MB → 7.46 MB).Scores vs. JetStream 3.0 (
<shell> cli.js --test=Kotlin-compose-wasmon a Linux x64 workstation, 5 interleaved rounds):d8(15.9.60)jsc(306270)Kotlin-compose-wasmFirst and Average subscores
d8First / AveragejscFirst / AverageKotlin-compose-wasmFirstis slower because Skiko0.156.0linksskiko.wasmwith Emscripten-s MAIN_MODULE=2(JetBrains/skiko#1213) and the modules have 11% more functions to compile. InAverage,MultipleComponentsandLazyGridare faster than in 3.0, whileAnimatedVisibilitydoes more per-frame work in Compose 1.12/1.13 (GapComposer,SnapshotStateObserver.observeReads) and Kotlin 2.4 (KT-73452array bounds checks).TODOs once upstream releases ship:
CMP_REVinbuild.shonce Compose1.13.0is stable (~mid-December 2026) and drop-Pcompose.version=1.13.0-beta01.compiler-options.patch(-Xwasm-kclass-fqn=false) once KT-91066 is fixed.