Skip to content

javafx-compat and mapping fixes - #6141

Open
shai-almog wants to merge 6 commits into
masterfrom
fx-compat-port-gaps
Open

shai-almog wants to merge 6 commits into
masterfrom
fx-compat-port-gaps

Conversation

@shai-almog

Copy link
Copy Markdown
Collaborator

Fixes for gaps and bugs found porting a real JavaFX mobile application (JFX Central's mobile module) to the JavaFX compatibility layer.

javafx-compat

  • ListProperty change listeners now fire on content changes (old and new value are the list), as in JavaFX.
  • Cell.layoutChildren no longer sets visible on a graphic whose visibility is bound (it threw "A bound value cannot be set").
  • ObservableValue.map, flatMap and orElse.
  • Region.insetsProperty().
  • ImageView -fx-fit-width, -fx-fit-height, -fx-preserve-ratio from CSS.
  • http:/https: images load in the background through ConnectionRequest.downloadImageToStorage (the Storage cache URLImage uses); views showing the image repaint and relayout when it arrives.
  • wrapText wraps a Label onto several lines: horizontal content bias, height for width, ellipsis-sized minimum width.

Mapping processor

  • Nested types are written by their canonical names in generated mappers (Outer$Inner failed to compile).
  • Properties inherited from superclasses are mapped.

Core / JavaSE

  • Lifecycle.handleNetworkError sends the log only for a thrown exception, not for an HTTP error code. In the simulator, sending asked for the build account with a modal prompt that blocked the EDT on a plain 404; that prompt is now skipped on the EDT and headless.
  • The default CodenameOneImplementation.getStorageEntrySize looped until skip() returned -1, but skip() returns 0 at end of stream, so it never ended. It now counts with read(). The shipping ports override it; the headless test implementation hung on it.

Tests: javafx-compat suite (535 incl. new PortGapsTest, RemoteImageTest, WrapTextTest), build-engine mapping processor tests (two new). SpotBugs zero for javafx-compat, build-engine, android, ios and core-unittests locally.

Not covered: wrapping for buttons, checkboxes and cells; lineSpacing, textOverrun, ellipsisString.

🤖 Generated with Claude Code

shai-almog and others added 6 commits October 30, 2026 19:03
…rvableValue.map, Region.insetsProperty, ImageView fit CSS

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…operties

Nested class/enum field types were emitted as binary names (Outer$Inner),
which javac rejects in source. Properties inherited from a non-@mapped
base class were silently dropped by the generated mapper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An HTTP error code is not a crash, so Lifecycle no longer sends the log for
it; the simulator's built_by_user prompt is skipped on the EDT or headless.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The default getStorageEntrySize looped until skip() answered -1, but
skip() answers 0 at the end of a stream, so an implementation without its
own override hung its background thread on the first cached image.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n Storage

Image downloads a remote URL through ConnectionRequest.downloadImageToStorage,
the cache URLImage uses, and tells the views showing it when it arrives.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Label with wrapText on now has a horizontal content bias, a preferred
height of its text wrapped at the given width, and a native peer
(WrappingLabel) that paints the wrapped lines. VBox, HBox and ScrollPane
already ask for height-for-width, so a column of wrapping labels in a
fit-to-width scroll pane gets the right height.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Developer Guide build artifacts are available for download from this workflow run:

Developer Guide quality checks:

  • AsciiDoc linter: No issues found (report)
  • Vale: No alerts found (report)
  • Paragraph capitalization: No paragraph capitalization issues (report)
  • LanguageTool: No grammar matches (report)
  • Image references: No unused images detected (report)

@shai-almog

shai-almog commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 12 screenshots: 12 matched.
✅ JavaSE simulator integration screenshots matched stored baselines.

@github-actions

Copy link
Copy Markdown
Contributor

Cloudflare Preview

@github-actions

Copy link
Copy Markdown
Contributor

✅ ByteCodeTranslator Quality Report

Test & Coverage

  • ✅ Tests: 901 total, 0 failed, 55 skipped

Benchmark Results

  • Execution Time: 8640 ms

  • Hotspots (Top 20 sampled methods):

    • 10.73% com.codename1.tools.translator.IteratorEscape.mangle (137 samples)
    • 7.83% java.lang.System.identityHashCode (100 samples)
    • 5.09% java.util.ArrayList.indexOf (65 samples)
    • 3.05% java.lang.Object.hashCode (39 samples)
    • 2.58% com.codename1.tools.translator.BytecodeMethod.equals (33 samples)
    • 2.35% java.lang.StringBuilder.append (30 samples)
    • 2.04% com.codename1.tools.translator.bytecodes.Invoke.findMethodUp (26 samples)
    • 1.96% com.codename1.tools.translator.BytecodeMethod.updateInlinableFieldDependencies (25 samples)
    • 1.64% com.codename1.tools.translator.IteratorEscape.walk (21 samples)
    • 1.57% java.lang.String.equals (20 samples)
    • 1.57% java.util.HashMap.hash (20 samples)
    • 1.49% com.codename1.tools.translator.JavascriptReachability.enqueueResolved (19 samples)
    • 1.49% com.codename1.tools.translator.ByteCodeClass.fillVirtualMethodTable (19 samples)
    • 1.41% com.codename1.tools.translator.bytecodes.Invoke.resolveDirectTarget (18 samples)
    • 1.33% com.codename1.tools.translator.NativeSymbolIndex.<init> (17 samples)
    • 1.25% java.io.FileOutputStream.writeBytes (16 samples)
    • 1.17% com.codename1.tools.translator.ByteCodeClass.hasDeclaredMethod (15 samples)
    • 1.10% com.codename1.tools.translator.BytecodeMethod.addToConstantPool (14 samples)
    • 1.10% java.util.AbstractCollection.containsAll (14 samples)
    • 1.02% java.lang.ProcessEnvironment$ExternalData.hashCode (13 samples)
  • ⚠️ Coverage report not generated.

Static Analysis

  • ✅ SpotBugs: no findings (report was not generated by the build).
  • ⚠️ PMD report not generated.
  • ⚠️ Checkstyle report not generated.

Generated automatically by the PR CI workflow.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Continuous Quality Report

Test & Coverage

Static Analysis

  • SpotBugs [Report archive]
    • ✅ ByteCodeTranslator: 0 findings (no issues)
    • ✅ android: 0 findings (no issues)
    • ✅ android-compat: 0 findings (no issues)
    • ✅ android-res-compiler: 0 findings (no issues)
    • ✅ backend: 0 findings (no issues)
    • ✅ backend-test: 0 findings (no issues)
    • ✅ build-engine: 0 findings (no issues)
    • ✅ build-hint-catalog: 0 findings (no issues)
    • ✅ build-hint-tools: 0 findings (no issues)
    • ✅ codenameone-gradle-plugin: 0 findings (no issues)
    • ✅ codenameone-maven-plugin: 0 findings (no issues)
    • ✅ compose-compat: 0 findings (no issues)
    • ✅ core-unittests: 0 findings (no issues)
    • ✅ desktop-compat-runtime: 0 findings (no issues)
    • ✅ fxml-compiler: 0 findings (no issues)
    • ✅ ios: 0 findings (no issues)
    • ✅ javac: 0 findings (no issues)
    • ✅ javafx-compat: 0 findings (no issues)
    • ✅ project-model: 0 findings (no issues)
    • ✅ swing-compat: 0 findings (no issues)
  • ✅ PMD: 0 findings (no issues) [Report archive]
  • ✅ Checkstyle: 0 findings (no issues) [Report archive]

Generated automatically by the PR CI workflow.

@shai-almog

shai-almog commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 231 screenshots: 231 matched.
✅ JavaScript-port screenshot tests passed.

@github-actions

Copy link
Copy Markdown
Contributor

Flutter vs Codename One

Same application, built both ways: Flutter's AOT compile of the gallery, and the identical Dart source transpiled to Java on Codename One. Lower is better for every metric, so a ratio above 1.00x means Codename One is ahead by that factor.

android

9 interleaved rounds; host load 0.76, 1.98, 1.75

Metric Codename One Flutter Ratio Winner
Installed size 78.3 MB 95.8 MB 1.22x Codename One
Executable code 4.7 MB 20.6 MB 4.35x Codename One
Download size (zipped) 78.3 MB 95.8 MB 1.22x Codename One
Cold start to first frame on screen 395 ms 1634 ms 4.14x Codename One
Memory at rest 45.1 MB 86.7 MB 1.93x Codename One

Start-up and memory at rest are judged round by round: the ratio is the median of the per-round ratios, each from two launches made back to back, and the times and sizes shown are each side's median, so the ratio need not equal their quotient. Codename One was ahead in 9 of 9 rounds on cold start to first frame on screen; 9 of 9 rounds on memory at rest.

Compute -- the VM workloads (vm/benchmarks), run inside each app; time is the best of the app's own repetitions, higher ratio means Codename One is faster.

Workload Codename One Flutter Ratio
intArithmetic 89 ms 188 ms 2.11x
longArithmetic 64 ms 59 ms 0.92x
mathTranscendental 227 ms 353 ms 1.55x
arraySequential 27 ms 36 ms 1.33x
arrayRandom 258 ms 331 ms 1.28x
objectAllocation 62 ms 50 ms 0.81x
valueEscape 7 ms 7 ms 1.00x
hashMapChurn 135 ms 298 ms 2.21x
stringBuilding 95 ms 127 ms 1.34x
recursion 84 ms 276 ms 3.29x
quicksortBench 127 ms 155 ms 1.22x
Geometric mean 1.43x

Gate: within tolerance against scripts/flutter-bench/baseline.

Android sizes are for the arm64-v8a slice a phone is delivered, on both sides; Flutter's release apk carries three ABIs and would otherwise count its engine about three times.
Android start-up and memory come from an x86_64 emulator with a software GPU. They compare the two runtimes on one machine; they are not phone timings, and a renderer that leans on the GPU is penalised more there.
This platform's adapter has not been exercised end to end before; treat the first published run as the thing under review.

ios

9 interleaved rounds; host load 32.27, 35.69, 30.52

Metric Codename One Flutter Ratio Winner
Installed size 108.5 MB 110.5 MB 1.02x Codename One
Executable code 17.4 MB 19.1 MB 1.09x Codename One
Download size (zipped) 80.0 MB 81.9 MB 1.02x Codename One
Cold start to first frame on screen -- -- -- not measured
Memory at rest -- -- -- not measured

Compute -- the VM workloads (vm/benchmarks), run inside each app; time is the best of the app's own repetitions, higher ratio means Codename One is faster.

Not measured: iOS compute is not measured: a device build needs signed hardware, and on the simulator Flutter runs its JIT debug engine rather than AOT code. The macOS row runs the same ParparVM and Dart AOT compilers on the same Apple silicon.

Gate: within tolerance against scripts/flutter-bench/baseline.

iOS start-up and memory are not measured here: Flutter cannot AOT-compile for the simulator, so a simulator run would time a JIT debug build against a release build. Sizes come from release device bundles; timings need signed hardware.
This platform's adapter has not been exercised end to end before; treat the first published run as the thing under review.

javascript

9 interleaved rounds; host load 1.91, 1.23, 0.55

Metric Codename One Flutter Ratio Winner
Installed size 104.4 MB 122.5 MB 1.17x Codename One
Executable code 13.3 MB 25.2 MB 1.89x Codename One
Download size (zipped) 76.4 MB 84.1 MB 1.10x Codename One
Cold start to first frame on screen -- -- -- not measured
Memory at rest -- -- -- not measured

Compute -- the VM workloads (vm/benchmarks), run inside each app; time is the best of the app's own repetitions, higher ratio means Codename One is faster.

Workload Codename One Flutter Ratio
intArithmetic 549 ms wrong result Flutter: wrong result
longArithmetic 4031 ms did not run Flutter: did not run
mathTranscendental 491 ms did not run Flutter: did not run
arraySequential 182 ms 70 ms 0.39x
arrayRandom 778 ms wrong result Flutter: wrong result
objectAllocation 28 ms 22 ms 0.79x
valueEscape 126 ms 6 ms 0.05x
hashMapChurn 762 ms 200 ms 0.26x
stringBuilding 379 ms 86 ms 0.23x
recursion 394 ms 397 ms 1.01x
quicksortBench 345 ms wrong result Flutter: wrong result
Geometric mean 0.31x

Gate: within tolerance against scripts/flutter-bench/baseline; BEHIND FLUTTER on Compute (geomean of the VM workloads) (reported, not gated: a loss to Flutter on the web is currently accepted).

the JavaScript adapter needs a Chrome DevTools driver; sizes are reported and timings are not
This platform's adapter has not been exercised end to end before; treat the first published run as the thing under review.

linux

9 interleaved rounds; host load 0.31, 3.11, 2.78

Metric Codename One Flutter Ratio Winner
Installed size 113.5 MB 143.8 MB 1.27x Codename One
Executable code 15.8 MB 16.1 MB 1.02x Codename One
Download size (zipped) 81.7 MB 92.9 MB 1.14x Codename One
Cold start to first frame on screen 176 ms 244 ms 1.38x Codename One
Memory at rest 90.4 MB 225.6 MB 2.50x Codename One

Start-up and memory at rest are judged round by round: the ratio is the median of the per-round ratios, each from two launches made back to back, and the times and sizes shown are each side's median, so the ratio need not equal their quotient. Codename One was ahead in 9 of 9 rounds on cold start to first frame on screen; 9 of 9 rounds on memory at rest.

Compute -- the VM workloads (vm/benchmarks), run inside each app; time is the best of the app's own repetitions, higher ratio means Codename One is faster.

Workload Codename One Flutter Ratio
intArithmetic 74 ms 184 ms 2.49x
longArithmetic 56 ms 56 ms 1.00x
mathTranscendental 239 ms 272 ms 1.14x
arraySequential 16 ms 35 ms 2.19x
arrayRandom 273 ms 296 ms 1.08x
objectAllocation 23 ms 37 ms 1.61x
valueEscape 5 ms 7 ms 1.40x
hashMapChurn 47 ms 338 ms 7.19x
stringBuilding 33 ms 126 ms 3.82x
recursion 92 ms 257 ms 2.79x
quicksortBench 142 ms 149 ms 1.05x
Geometric mean 1.91x

Gate: within tolerance against scripts/flutter-bench/baseline.

This platform's adapter has not been exercised end to end before; treat the first published run as the thing under review.

macos

9 interleaved rounds; host load 6.56, 20.41, 25.29

Metric Codename One Flutter Ratio Winner
Installed size 124.6 MB 139.4 MB 1.12x Codename One
Executable code 33.5 MB 47.9 MB 1.43x Codename One
Download size (zipped) 85.6 MB 93.3 MB 1.09x Codename One
Cold start to first frame on screen 438 ms 677 ms 1.54x Codename One
Memory at rest 34.6 MB 55.0 MB 1.59x Codename One

Start-up and memory at rest are judged round by round: the ratio is the median of the per-round ratios, each from two launches made back to back, and the times and sizes shown are each side's median, so the ratio need not equal their quotient. Codename One was ahead in 9 of 9 rounds on cold start to first frame on screen; 9 of 9 rounds on memory at rest.

Compute -- the VM workloads (vm/benchmarks), run inside each app; time is the best of the app's own repetitions, higher ratio means Codename One is faster.

Workload Codename One Flutter Ratio
intArithmetic 112 ms 254 ms 2.27x
longArithmetic 76 ms 67 ms 0.88x
mathTranscendental 267 ms 325 ms 1.22x
arraySequential 12 ms 46 ms 3.83x
arrayRandom 270 ms 329 ms 1.22x
objectAllocation 79 ms 28 ms 0.35x
valueEscape 5 ms 13 ms 2.60x
hashMapChurn 43 ms 152 ms 3.54x
stringBuilding 27 ms 104 ms 3.85x
recursion 127 ms 258 ms 2.03x
quicksortBench 117 ms 132 ms 1.13x
Geometric mean 1.69x

Gate: within tolerance against scripts/flutter-bench/baseline.

This platform's adapter has not been exercised end to end before; treat the first published run as the thing under review.

windows

9 interleaved rounds

Metric Codename One Flutter Ratio Winner
Installed size 108.4 MB 121.1 MB 1.12x Codename One
Executable code 11.8 MB 14.1 MB 1.20x Codename One
Download size (zipped) 78.1 MB 86.4 MB 1.11x Codename One
Cold start to first frame on screen 157 ms 260 ms 1.62x Codename One
Memory at rest 57.3 MB 92.7 MB 1.61x Codename One

Start-up and memory at rest are judged round by round: the ratio is the median of the per-round ratios, each from two launches made back to back, and the times and sizes shown are each side's median, so the ratio need not equal their quotient. Codename One was ahead in 9 of 9 rounds on cold start to first frame on screen; 9 of 9 rounds on memory at rest.

Compute -- the VM workloads (vm/benchmarks), run inside each app; time is the best of the app's own repetitions, higher ratio means Codename One is faster.

Workload Codename One Flutter Ratio
intArithmetic 80 ms 184 ms 2.30x
longArithmetic 60 ms 57 ms 0.95x
mathTranscendental 199 ms 268 ms 1.35x
arraySequential 12 ms 36 ms 3.00x
arrayRandom 303 ms 312 ms 1.03x
objectAllocation 24 ms 40 ms 1.67x
valueEscape 1 ms 7 ms 7.00x
hashMapChurn 49 ms 315 ms 6.43x
stringBuilding 35 ms 123 ms 3.51x
recursion 200 ms 269 ms 1.34x
quicksortBench 142 ms 147 ms 1.03x
Geometric mean 2.09x

Gate: within tolerance against scripts/flutter-bench/baseline.

This platform's adapter has not been exercised end to end before; treat the first published run as the thing under review.

Codename One wins 26 of 26 measured metrics across 6 platform(s).

@shai-almog

shai-almog commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 210 screenshots: 210 matched.
Native Windows port (x64 / Intel-AMD): full hellocodenameone screenshot suite rendered offscreen with Direct2D/DirectWrite, plus the real benchmarks (base64 native/CN1/SIMD, image createMask/applyMask/modifyAlpha/PNG/JPEG, SSE2 SIMD kernels). Compared against the in-repo baseline in scripts/windows/screenshots.

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 47ms / native 3ms = 15.6x speedup
SIMD float-mul (64K x300) java 44ms / native 2ms = 22.0x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 61.000 ms
Base64 CN1 decode 72.000 ms
Base64 SIMD encode 92.000 ms
Base64 encode ratio (SIMD/CN1) 1.508x (50.8% slower)
Base64 SIMD decode 81.000 ms
Base64 decode ratio (SIMD/CN1) 1.125x (12.5% slower)
Image encode benchmark iterations 100
Image createMask (SIMD off) 7.000 ms
Image createMask (SIMD on) 3.000 ms
Image createMask ratio (SIMD on/off) 0.429x (57.1% faster)
Image applyMask (SIMD off) 41.000 ms
Image applyMask (SIMD on) 38.000 ms
Image applyMask ratio (SIMD on/off) 0.927x (7.3% faster)
Image modifyAlpha (SIMD off) 35.000 ms
Image modifyAlpha (SIMD on) 11.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.314x (68.6% faster)
Image modifyAlpha removeColor (SIMD off) 27.000 ms
Image modifyAlpha removeColor (SIMD on) 19.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.704x (29.6% faster)

ParparVM vs HotSpot (JDK 25): Windows x64

Runner CPU: AMD64 Family 25 Model 17 Stepping 1, AuthenticAMD (baseline windows-x64@amd64-family-25-model-17-authenticamd)

Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 20% (time) / 25% (RAM) above its baseline in vm/selfhost/perf-baseline/ is a regression and fails; one that far below is an improvement, reported but not failed (a row whose calibration runs were noisier carries a wider tolerance), and for RAM the change must also exceed 0.05x in absolute terms. Both run unpinned on all of the runner's CPUs, with their own default thread counts.

Benchmark Cores Time RAM Status
hello (WinHelloMain) 4 1.42x (base 1.38x, +3.5%) 0.65x (base 0.82x, -20.6%) ok
translator (self) 4 0.78x (base 0.89x, -12.2%) 0.50x (base 0.55x, -8.9%) ok
intArithmetic 4 1.10x (base 1.10x, +0.5%) 0.06x (base 0.06x, -0.6%) ok
longArithmetic 4 1.08x (base 1.08x, -0.0%) 0.06x (base 0.06x, +1.6%) ok
mathTranscendental 4 0.85x (base 0.85x, +0.3%) 0.06x (base 0.06x, +4.4%) ok
arraySequential 4 1.84x (base 1.72x, +6.9%) 0.38x (base 0.38x, +0.3%) ok
arrayRandom 4 1.02x (base 1.01x, +0.3%) 0.23x (base 0.23x, +0.7%) ok
objectAllocation 4 1.25x (base 1.25x, -0.3%) 0.28x (base 0.29x, -3.9%) ok
valueEscape 4 0.10x (base 0.10x, -1.4%) 0.05x (base 0.04x, +4.1%) ok
hashMapChurn 4 1.33x (base 1.39x, -4.1%) 0.10x (base 0.10x, +7.8%) ok
stringBuilding 4 1.40x (base 1.36x, +3.4%) 0.32x (base 0.28x, +15.8%) ok
recursion 4 1.38x (base 1.43x, -3.4%) 0.06x (base 0.06x, +3.3%) ok
quicksort 4 1.10x (base 1.11x, -0.7%) 0.12x (base 0.12x, +0.8%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 210 screenshots: 210 matched.
Native Windows port (arm64 / Apple Silicon - Arm): full hellocodenameone screenshot suite rendered offscreen with Direct2D/DirectWrite, plus the real benchmarks (base64 native/CN1/SIMD, image createMask/applyMask/modifyAlpha/PNG/JPEG, NEON SIMD kernels). Compared against the in-repo baseline in scripts/windows/screenshots.

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 50ms / native 3ms = 16.6x speedup
SIMD float-mul (64K x300) java 49ms / native 3ms = 16.3x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 60.000 ms
Base64 CN1 decode 69.000 ms
Base64 SIMD encode 77.000 ms
Base64 encode ratio (SIMD/CN1) 1.283x (28.3% slower)
Base64 SIMD decode 68.000 ms
Base64 decode ratio (SIMD/CN1) 0.986x (1.4% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 6.000 ms
Image createMask (SIMD on) 0.000 ms
Image createMask ratio (SIMD on/off) 0.000x (100.0% faster)
Image applyMask (SIMD off) 18.000 ms
Image applyMask (SIMD on) 20.000 ms
Image applyMask ratio (SIMD on/off) 1.111x (11.1% slower)
Image modifyAlpha (SIMD off) 17.000 ms
Image modifyAlpha (SIMD on) 13.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.765x (23.5% faster)
Image modifyAlpha removeColor (SIMD off) 16.000 ms
Image modifyAlpha removeColor (SIMD on) 9.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.563x (43.8% faster)

ParparVM vs HotSpot (JDK 25): Windows arm64

Runner CPU: ARMv8 (64-bit) Family 8 Model D49 Revision 0, MICROSOFT CORPORATION (baseline windows-arm64@armv8-64-bit-family-8-model-d49-microsoft-corporation)

Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 20% (time) / 25% (RAM) above its baseline in vm/selfhost/perf-baseline/ is a regression and fails; one that far below is an improvement, reported but not failed (a row whose calibration runs were noisier carries a wider tolerance), and for RAM the change must also exceed 0.05x in absolute terms. Both run unpinned on all of the runner's CPUs, with their own default thread counts.

Benchmark Cores Time RAM Status
hello (WinHelloMain) 4 1.05x (base 1.11x, -5.2%) 0.71x (base 0.75x, -6.1%) ok
translator (self) 4 0.85x (base 0.84x, +1.3%) 0.48x (base 0.51x, -5.9%) ok
intArithmetic 4 1.04x (base 1.04x, -0.0%) 0.06x (base 0.06x, +3.1%) ok
longArithmetic 4 0.79x (base 0.80x, -0.3%) 0.06x (base 0.06x, +3.4%) ok
mathTranscendental 4 0.72x (base 0.72x, -0.5%) 0.07x (base 0.06x, +1.7%) ok
arraySequential 4 0.42x (base 0.46x, -7.6%) 0.39x (base 0.39x, +0.0%) ok
arrayRandom 4 0.93x (base 0.94x, -0.5%) 0.23x (base 0.23x, +0.2%) ok
objectAllocation 4 1.81x (base 1.82x, -0.4%) 0.41x (base 0.43x, -3.7%) ok
valueEscape 4 0.76x (base 0.76x, +0.0%) 0.05x (base 0.05x, +3.2%) ok
hashMapChurn 4 0.99x (base 0.98x, +0.5%) 0.12x (base 0.12x, -1.5%) ok
stringBuilding 4 1.52x (base 1.43x, +6.8%) 0.27x (base 0.27x, -0.2%) ok
recursion 4 1.42x (base 1.46x, -3.1%) 0.07x (base 0.07x, +1.4%) ok
quicksort 4 1.01x (base 1.00x, +0.7%) 0.12x (base 0.12x, +0.6%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 195 screenshots: 195 matched.

Native Android coverage

  • 📊 Line coverage: 19.18% (56056/292310 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 18.13% (270072/1489315), branch 12.39% (19643/158497), complexity 10.36% (15820/152700), method 15.72% (11386/72424), class 27.87% (2236/8024)
    • Lowest covered classes
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2396 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.ClassReader – 0.00% (0/1524 lines covered)
      • androidx.compose.runtime.androidx.compose.runtime.LinkComposer – 0.00% (0/1430 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.MethodWriter – 0.00% (0/922 lines covered)
      • kotlinx.coroutines.channels.kotlinx.coroutines.channels.BufferedChannel – 0.00% (0/863 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/744 lines covered)
      • com.google.common.cache.com.google.common.cache.LocalCache$Segment – 0.00% (0/726 lines covered)
      • okio.okio.Buffer – 0.00% (0/687 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/630 lines covered)
      • com.codename1.androidcompat.rt.com.codename1.androidcompat.rt.TextXmlPullParser – 0.00% (0/623 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 19.18% (56056/292310 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 18.13% (270072/1489315), branch 12.39% (19643/158497), complexity 10.36% (15820/152700), method 15.72% (11386/72424), class 27.87% (2236/8024)
    • Lowest covered classes
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2396 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.ClassReader – 0.00% (0/1524 lines covered)
      • androidx.compose.runtime.androidx.compose.runtime.LinkComposer – 0.00% (0/1430 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.MethodWriter – 0.00% (0/922 lines covered)
      • kotlinx.coroutines.channels.kotlinx.coroutines.channels.BufferedChannel – 0.00% (0/863 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/744 lines covered)
      • com.google.common.cache.com.google.common.cache.LocalCache$Segment – 0.00% (0/726 lines covered)
      • okio.okio.Buffer – 0.00% (0/687 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/630 lines covered)
      • com.codename1.androidcompat.rt.com.codename1.androidcompat.rt.TextXmlPullParser – 0.00% (0/623 lines covered)

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend scalar fallback (no native SIMD)
SIMD int-add (64K x300) java 209ms / native 134ms = 1.5x speedup
SIMD float-mul (64K x300) java 111ms / native 87ms = 1.2x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 92.000 ms
Base64 CN1 decode 90.000 ms
Base64 native encode 405.000 ms
Base64 encode ratio (CN1/native) 0.227x (77.3% faster)
Base64 native decode 277.000 ms
Base64 decode ratio (CN1/native) 0.325x (67.5% faster)
Image encode benchmark status skipped (SIMD unsupported)

@shai-almog

shai-almog commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 196 screenshots: 196 matched.
✅ Native Mac screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 630 seconds

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 55ms / native 2ms = 27.5x speedup
SIMD float-mul (64K x300) java 54ms / native 3ms = 18.0x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path active (NEON-accelerated)
Base64 CN1 encode 45.000 ms
Base64 CN1 decode 53.000 ms
Image encode benchmark iterations 100
Image createMask (SIMD off) 5.000 ms
Image createMask (SIMD on) 3.000 ms
Image createMask ratio (SIMD on/off) 0.600x (40.0% faster)
Image applyMask (SIMD off) 52.000 ms
Image applyMask (SIMD on) 46.000 ms
Image applyMask ratio (SIMD on/off) 0.885x (11.5% faster)
Image modifyAlpha (SIMD off) 48.000 ms
Image modifyAlpha (SIMD on) 43.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.896x (10.4% faster)
Image modifyAlpha removeColor (SIMD off) 46.000 ms
Image modifyAlpha removeColor (SIMD on) 40.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.870x (13.0% faster)

ParparVM vs HotSpot (JDK 25): macOS arm64

Runner CPU: Apple M1 (Virtual) (baseline macos-arm64)

Ratios are ParparVM / JDK 25: below 1.00x ParparVM is faster (time) or smaller (RAM). Median of 5 interleaved, paired rounds; every run's output was verified. A ratio more than 20% (time) / 25% (RAM) above its baseline in vm/selfhost/perf-baseline/ is a regression and fails; one that far below is an improvement, reported but not failed (a row whose calibration runs were noisier carries a wider tolerance), and for RAM the change must also exceed 0.05x in absolute terms. Both run unpinned on all of the runner's CPUs, with their own default thread counts.

Benchmark Cores Time RAM Status
hello (HelloCodenameOne) 3 0.81x (base 0.96x, -15.1%) 0.84x (base 0.93x, -9.3%) ok
translator (self) 3 0.64x (base 0.62x, +2.5%) 0.89x (base 0.78x, +13.3%) ok
intArithmetic 3 1.04x (base 1.03x, +0.5%) 0.12x (base 0.12x, +0.8%) ok
longArithmetic 3 1.01x (base 1.03x, -1.2%) 0.11x (base 0.07x, +64.2%) ok
mathTranscendental 3 0.98x (base 1.01x, -2.5%) 0.12x (base 0.12x, +1.2%) ok
arraySequential 3 0.42x (base 0.42x, +1.0%) 0.53x (base 0.53x, +0.1%) ok
arrayRandom 3 0.98x (base 0.99x, -1.2%) 0.32x (base 0.32x, +0.2%) ok
objectAllocation 3 1.11x (base 1.11x, +0.3%) 0.88x (base 0.72x, +21.8%) ok
valueEscape 3 0.51x (base 0.51x, +0.2%) 0.08x (base 0.09x, -9.7%) ok
hashMapChurn 3 1.09x (base 1.18x, -7.1%) 0.06x (base 0.07x, -3.7%) ok
stringBuilding 3 1.01x (base 0.84x, +19.9%) 0.40x (base 0.46x, -13.8%) ok
recursion 3 1.23x (base 1.24x, -0.6%) 0.12x (base 0.12x, -0.3%) ok
quicksort 3 0.99x (base 1.01x, -2.2%) 0.11x (base 0.11x, +0.3%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 192 screenshots: 192 matched.
✅ Native Mac screenshot tests passed.

Benchmark Results

  • VM Translation Time: 0 seconds
  • Compilation Time: 564 seconds

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 83ms / native 12ms = 6.9x speedup
SIMD float-mul (64K x300) java 49ms / native 3ms = 16.3x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path active (NEON-accelerated)
Base64 CN1 encode 49.000 ms
Base64 CN1 decode 50.000 ms
Base64 native encode 555.000 ms
Base64 encode ratio (CN1/native) 0.088x (91.2% faster)
Base64 native decode 289.000 ms
Base64 decode ratio (CN1/native) 0.173x (82.7% faster)
Base64 SIMD encode 47.000 ms
Base64 encode ratio (SIMD/CN1) 0.959x (4.1% faster)
Base64 SIMD decode 42.000 ms
Base64 decode ratio (SIMD/CN1) 0.840x (16.0% faster)
Base64 encode ratio (SIMD/native) 0.085x (91.5% faster)
Base64 decode ratio (SIMD/native) 0.145x (85.5% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 5.000 ms
Image createMask (SIMD on) 2.000 ms
Image createMask ratio (SIMD on/off) 0.400x (60.0% faster)
Image applyMask (SIMD off) 41.000 ms
Image applyMask (SIMD on) 33.000 ms
Image applyMask ratio (SIMD on/off) 0.805x (19.5% faster)
Image modifyAlpha (SIMD off) 48.000 ms
Image modifyAlpha (SIMD on) 35.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.729x (27.1% faster)
Image modifyAlpha removeColor (SIMD off) 41.000 ms
Image modifyAlpha removeColor (SIMD on) 32.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.780x (22.0% faster)

@shai-almog

shai-almog commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator Author

Apple Watch (watchOS / Core Graphics)

Compared 253 screenshots: 247 matched, 2 updated, 4 missing references.

  • KmpCompatLayout — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots-watch/KmpCompatLayout.png.

    KmpCompatLayout
    Preview info: JPEG preview quality 70; JPEG preview quality 70.
    Full-resolution PNG saved as KmpCompatLayout.png in workflow artifacts.

  • KmpCompatList — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots-watch/KmpCompatList.png.

    KmpCompatList
    Preview info: JPEG preview quality 70; JPEG preview quality 70.
    Full-resolution PNG saved as KmpCompatList.png in workflow artifacts.

  • KmpCompatState — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots-watch/KmpCompatState.png.

    KmpCompatState
    Preview info: JPEG preview quality 70; JPEG preview quality 70.
    Full-resolution PNG saved as KmpCompatState.png in workflow artifacts.

  • KmpCompatTypography — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots-watch/KmpCompatTypography.png.

    KmpCompatTypography
    Preview info: JPEG preview quality 70; JPEG preview quality 70.
    Full-resolution PNG saved as KmpCompatTypography.png in workflow artifacts.

  • Sheet — updated screenshot. Screenshot differs (416x496 px, bit depth 8).

    Sheet
    Preview info: JPEG preview quality 70; JPEG preview quality 70.
    Full-resolution PNG saved as Sheet.png in workflow artifacts.

  • TabsAnimatedIndicatorScreenshotTest — updated screenshot. Screenshot differs (208x248 px, bit depth 8).

    TabsAnimatedIndicatorScreenshotTest
    Preview info: JPEG preview quality 70; JPEG preview quality 70.
    Full-resolution PNG saved as TabsAnimatedIndicatorScreenshotTest.png in workflow artifacts.

@shai-almog

shai-almog commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator Author

Apple TV (tvOS / Metal)

Compared 188 screenshots: 171 matched, 13 updated, 4 missing references.

  • AnimateHierarchyScreenshotTest — updated screenshot. Screenshot differs (3840x2160 px, bit depth 8).

    AnimateHierarchyScreenshotTest
    Preview info: JPEG preview quality 50; JPEG preview quality 50; downscaled to 1344x756.
    Full-resolution PNG saved as AnimateHierarchyScreenshotTest.png in workflow artifacts.

  • AnimateLayoutScreenshotTest — updated screenshot. Screenshot differs (3840x2160 px, bit depth 8).

    AnimateLayoutScreenshotTest
    Preview info: JPEG preview quality 20; JPEG preview quality 20; downscaled to 1344x756.
    Full-resolution PNG saved as AnimateLayoutScreenshotTest.png in workflow artifacts.

  • AnimateUnlayoutScreenshotTest — updated screenshot. Screenshot differs (3840x2160 px, bit depth 8).

    AnimateUnlayoutScreenshotTest
    Preview info: JPEG preview quality 50; JPEG preview quality 50; downscaled to 1344x756.
    Full-resolution PNG saved as AnimateUnlayoutScreenshotTest.png in workflow artifacts.

  • KmpCompatLayout — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots-tv/KmpCompatLayout.png.

    KmpCompatLayout
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 1920x1080.
    Full-resolution PNG saved as KmpCompatLayout.png in workflow artifacts.

  • KmpCompatList — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots-tv/KmpCompatList.png.

    KmpCompatList
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 1920x1080.
    Full-resolution PNG saved as KmpCompatList.png in workflow artifacts.

  • KmpCompatState — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots-tv/KmpCompatState.png.

    KmpCompatState
    Preview info: JPEG preview quality 50; JPEG preview quality 50; downscaled to 1920x1080.
    Full-resolution PNG saved as KmpCompatState.png in workflow artifacts.

  • KmpCompatTypography — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots-tv/KmpCompatTypography.png.

    KmpCompatTypography
    Preview info: JPEG preview quality 20; JPEG preview quality 20; downscaled to 1920x1080.
    Full-resolution PNG saved as KmpCompatTypography.png in workflow artifacts.

  • MorphTransitionScrolledSourceTest — updated screenshot. Screenshot differs (3840x2160 px, bit depth 8).

    MorphTransitionScrolledSourceTest
    Preview info: JPEG preview quality 70; JPEG preview quality 70; downscaled to 1344x756.
    Full-resolution PNG saved as MorphTransitionScrolledSourceTest.png in workflow artifacts.

  • PullToRefreshSpinnerScreenshotTest — updated screenshot. Screenshot differs (3840x2160 px, bit depth 8).

    PullToRefreshSpinnerScreenshotTest
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 1920x1080.
    Full-resolution PNG saved as PullToRefreshSpinnerScreenshotTest.png in workflow artifacts.

  • SheetSlideUpAnimationScreenshotTest — updated screenshot. Screenshot differs (3840x2160 px, bit depth 8).

    SheetSlideUpAnimationScreenshotTest
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 1920x1080.
    Full-resolution PNG saved as SheetSlideUpAnimationScreenshotTest.png in workflow artifacts.

  • SmoothScrollScreenshotTest — updated screenshot. Screenshot differs (3840x2160 px, bit depth 8).

    SmoothScrollScreenshotTest
    Preview info: JPEG preview quality 20; JPEG preview quality 20; downscaled to 1344x756.
    Full-resolution PNG saved as SmoothScrollScreenshotTest.png in workflow artifacts.

  • StatusBarTapDiagnosticScreenshotTest — updated screenshot. Screenshot differs (3840x2160 px, bit depth 8).

    StatusBarTapDiagnosticScreenshotTest
    Preview info: JPEG preview quality 60; JPEG preview quality 60; downscaled to 1344x756.
    Full-resolution PNG saved as StatusBarTapDiagnosticScreenshotTest.png in workflow artifacts.

  • StickyHeaderFadeTransitionScreenshotTest — updated screenshot. Screenshot differs (3840x2160 px, bit depth 8).

    StickyHeaderFadeTransitionScreenshotTest
    Preview info: JPEG preview quality 30; JPEG preview quality 30; downscaled to 1344x756.
    Full-resolution PNG saved as StickyHeaderFadeTransitionScreenshotTest.png in workflow artifacts.

  • StickyHeaderScreenshotTest — updated screenshot. Screenshot differs (3840x2160 px, bit depth 8).

    StickyHeaderScreenshotTest
    Preview info: JPEG preview quality 40; JPEG preview quality 40; downscaled to 1344x756.
    Full-resolution PNG saved as StickyHeaderScreenshotTest.png in workflow artifacts.

  • StickyHeaderSlideTransitionScreenshotTest — updated screenshot. Screenshot differs (3840x2160 px, bit depth 8).

    StickyHeaderSlideTransitionScreenshotTest
    Preview info: JPEG preview quality 30; JPEG preview quality 30; downscaled to 1344x756.
    Full-resolution PNG saved as StickyHeaderSlideTransitionScreenshotTest.png in workflow artifacts.

  • TabsAnimatedIndicatorScreenshotTest — updated screenshot. Screenshot differs (3840x2160 px, bit depth 8).

    TabsAnimatedIndicatorScreenshotTest
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 1920x1080.
    Full-resolution PNG saved as TabsAnimatedIndicatorScreenshotTest.png in workflow artifacts.

  • TensileBounceScreenshotTest — updated screenshot. Screenshot differs (3840x2160 px, bit depth 8).

    TensileBounceScreenshotTest
    Preview info: JPEG preview quality 30; JPEG preview quality 30; downscaled to 1344x756.
    Full-resolution PNG saved as TensileBounceScreenshotTest.png in workflow artifacts.

@shai-almog shai-almog changed the title javafx-compat and mapping fixes from porting JFX Central mobile javafx-compat and mapping fixes Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant