Skip to content

cn1lib: a library can carry a server half - #6139

Open
shai-almog wants to merge 6 commits into
masterfrom
cn1lib-backend-part
Open

shai-almog wants to merge 6 commits into
masterfrom
cn1lib-backend-part

Conversation

@shai-almog

Copy link
Copy Markdown
Collaborator

A cn1lib can now ship server code. Its controllers, beans, entities, repositories and migrations are wired into any server that depends on it, as if that server had compiled them.

How

  • A jar carrying META-INF/codenameone/backend-library is a backend library. BackendLibraries.merge copies it into the server module's classes before annotation processing: Maven process-annotations, Gradle compileJava, and the native BackendPackager. The library itself is never processed, so its generated wiring can't collide with the server's.
  • .cn1lib gains backend.zip (Cn1libMojo packs it, Cn1libInstaller unpacks it to the backend classifier). The cn1lib archetype gets a backend module, and Gradle cn1libs publish <name>-backend from src/backend/{java,resources}.
  • The merge records each copied file with its size and CRC32. A library upgrade or removal leaves nothing stale, and a class the module compiles over a merged one stays the module's. The record is restamped after processing, failed or not, because weaving rewrites merged classes in place.
  • The library jars are a content input of Gradle's compileJava. Without that, compile avoidance would skip the merge when a library changes a method body or a migration.
  • The native packager stages only cn1-native from a library (jar or directory), so no class is translated twice.

Tests

  • BackendLibrariesTest: 7 tests, including the module-class-wins and rewritten-class cases.
  • maven/integration-tests/backend-cn1lib-test.sh: new, runs in archetype-smoke. A generated cn1lib with an endpoint, service, entity, repository and migration is consumed by a generated server, and checked with @BackendTest and natively compiled tests.
  • gradle-cn1lib-test.sh checks the <name>-backend artifact.

Docs: Backend-Beans ("Controllers and beans from a library"), Backend-Data, Advanced Topics (cn1lib contents) and Gradle-Project-Workflow.

🤖 Generated with Claude Code

shai-almog and others added 2 commits October 30, 2026 15:50
A jar marked with META-INF/codenameone/backend-library is a backend library:
a server that depends on one wires its controllers, beans, entities,
repositories and migrations as its own, on the JVM (Maven process-annotations,
Gradle compileJava) and in the native backend build. The library itself is
never processed. A .cn1lib carries the server half as backend.zip; the cn1lib
archetype gains a backend module and Gradle cn1libs publish <name>-backend.

The merge records what it copied, with each file's size and CRC, so a library
upgraded or dropped leaves nothing stale, and a class the module compiled over
a merged one stays the module's. The record is restamped after processing,
failed or not, because weaving rewrites merged classes in place.

Tested by BackendLibrariesTest, backend-cn1lib-test.sh (archetype-smoke,
JVM and native) and gradle-cn1lib-test.sh; documented in the developer guide.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The guide's snippet gate requires every source block to come from
docs/demos.

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

Copy link
Copy Markdown
Contributor

Cloudflare Preview

@github-actions

github-actions Bot commented Oct 30, 2026 •

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.

ProcessAnnotationsMojoTest runs the mojo with no project; every other
helper there allows for that, and the backend-library check did not.

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

github-actions Bot commented Oct 30, 2026 •

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.97, 2.06, 1.63

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 331 ms 1335 ms 3.75x Codename One
Memory at rest 44.9 MB 77.8 MB 1.74x 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 78 ms 165 ms 2.12x
longArithmetic 56 ms 53 ms 0.95x
mathTranscendental 218 ms 281 ms 1.29x
arraySequential 23 ms 31 ms 1.35x
arrayRandom 202 ms 242 ms 1.20x
objectAllocation 53 ms 35 ms 0.66x
valueEscape 6 ms 6 ms 1.00x
hashMapChurn 108 ms 236 ms 2.19x
stringBuilding 75 ms 98 ms 1.31x
recursion 67 ms 234 ms 3.49x
quicksortBench 111 ms 132 ms 1.19x
Geometric mean 1.37x

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.86, 36.37, 28.98

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 2.3, 1.55, 0.7

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 646 ms wrong result Flutter: wrong result
longArithmetic 5000 ms did not run Flutter: did not run
mathTranscendental 574 ms did not run Flutter: did not run
arraySequential 227 ms 83 ms 0.37x
arrayRandom 1011 ms wrong result Flutter: wrong result
objectAllocation 38 ms 28 ms 0.74x
valueEscape 110 ms 7 ms 0.06x
hashMapChurn 1127 ms 246 ms 0.22x
stringBuilding 533 ms 108 ms 0.20x
recursion 508 ms 494 ms 0.97x
quicksortBench 416 ms wrong result Flutter: wrong result
Geometric mean 0.30x

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.38, 2.61, 1.92

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 128 ms 166 ms 1.29x Codename One
Memory at rest 90.5 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 8 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 47 ms 122 ms 2.60x
longArithmetic 35 ms 34 ms 0.97x
mathTranscendental 146 ms 162 ms 1.11x
arraySequential 9 ms 20 ms 2.22x
arrayRandom 183 ms 190 ms 1.04x
objectAllocation 13 ms 21 ms 1.61x
valueEscape 3 ms 5 ms 1.67x
hashMapChurn 24 ms 200 ms 8.33x
stringBuilding 17 ms 64 ms 3.77x
recursion 45 ms 167 ms 3.71x
quicksortBench 106 ms 113 ms 1.07x
Geometric mean 2.01x

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 3.1, 15.28, 15.84

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 341 ms 531 ms 1.62x Codename One
Memory at rest 34.4 MB 53.2 MB 1.54x 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 116 ms 234 ms 2.02x
longArithmetic 72 ms 63 ms 0.88x
mathTranscendental 274 ms 335 ms 1.22x
arraySequential 10 ms 44 ms 4.40x
arrayRandom 283 ms 330 ms 1.17x
objectAllocation 71 ms 27 ms 0.38x
valueEscape 6 ms 12 ms 2.00x
hashMapChurn 36 ms 153 ms 4.25x
stringBuilding 21 ms 97 ms 4.62x
recursion 118 ms 245 ms 2.08x
quicksortBench 109 ms 125 ms 1.15x
Geometric mean 1.72x

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 158 ms 243 ms 1.56x Codename One
Memory at rest 57.2 MB 92.3 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 93 ms 248 ms 2.67x
longArithmetic 58 ms 67 ms 1.16x
mathTranscendental 195 ms 215 ms 1.10x
arraySequential 11 ms 44 ms 4.00x
arrayRandom 280 ms 335 ms 1.20x
objectAllocation 36 ms 50 ms 1.39x
valueEscape 1 ms 14 ms 14.00x
hashMapChurn 49 ms 288 ms 5.88x
stringBuilding 29 ms 121 ms 4.17x
recursion 208 ms 243 ms 1.17x
quicksortBench 173 ms 165 ms 0.95x
Geometric mean 2.28x

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).

@github-actions

github-actions Bot commented Oct 30, 2026 •

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 195 screenshots: 195 matched.

Native Android coverage

  • 📊 Line coverage: 19.19% (56038/292047 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 18.14% (269997/1488151), branch 12.40% (19633/158314), complexity 10.36% (15811/152567), method 15.72% (11379/72383), class 27.88% (2235/8017)
    • 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.19% (56038/292047 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 18.14% (269997/1488151), branch 12.40% (19633/158314), complexity 10.36% (15811/152567), method 15.72% (11379/72383), class 27.88% (2235/8017)
    • 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 198ms / native 101ms = 1.9x speedup
SIMD float-mul (64K x300) java 166ms / native 137ms = 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 87.000 ms
Base64 CN1 decode 84.000 ms
Base64 native encode 441.000 ms
Base64 encode ratio (CN1/native) 0.197x (80.3% faster)
Base64 native decode 268.000 ms
Base64 decode ratio (CN1/native) 0.313x (68.7% faster)
Image encode benchmark status skipped (SIMD unsupported)

@shai-almog

shai-almog commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

@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: 630 seconds

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 59ms / native 7ms = 8.4x speedup
SIMD float-mul (64K x300) java 52ms / native 2ms = 26.0x 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 69.000 ms
Base64 CN1 decode 69.000 ms
Base64 native encode 705.000 ms
Base64 encode ratio (CN1/native) 0.098x (90.2% faster)
Base64 native decode 362.000 ms
Base64 decode ratio (CN1/native) 0.191x (80.9% faster)
Base64 SIMD encode 71.000 ms
Base64 encode ratio (SIMD/CN1) 1.029x (2.9% slower)
Base64 SIMD decode 61.000 ms
Base64 decode ratio (SIMD/CN1) 0.884x (11.6% faster)
Base64 encode ratio (SIMD/native) 0.101x (89.9% faster)
Base64 decode ratio (SIMD/native) 0.169x (83.1% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 7.000 ms
Image createMask (SIMD on) 4.000 ms
Image createMask ratio (SIMD on/off) 0.571x (42.9% faster)
Image applyMask (SIMD off) 56.000 ms
Image applyMask (SIMD on) 52.000 ms
Image applyMask ratio (SIMD on/off) 0.929x (7.1% faster)
Image modifyAlpha (SIMD off) 50.000 ms
Image modifyAlpha (SIMD on) 35.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.700x (30.0% faster)
Image modifyAlpha removeColor (SIMD off) 46.000 ms
Image modifyAlpha removeColor (SIMD on) 33.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.717x (28.3% faster)

@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: 626 seconds

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 62ms / native 4ms = 15.5x speedup
SIMD float-mul (64K x300) java 60ms / native 3ms = 20.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 55.000 ms
Base64 CN1 decode 59.000 ms
Image encode benchmark iterations 100
Image createMask (SIMD off) 9.000 ms
Image createMask (SIMD on) 4.000 ms
Image createMask ratio (SIMD on/off) 0.444x (55.6% faster)
Image applyMask (SIMD off) 62.000 ms
Image applyMask (SIMD on) 69.000 ms
Image applyMask ratio (SIMD on/off) 1.113x (11.3% slower)
Image modifyAlpha (SIMD off) 73.000 ms
Image modifyAlpha (SIMD on) 62.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.849x (15.1% faster)
Image modifyAlpha removeColor (SIMD off) 55.000 ms
Image modifyAlpha removeColor (SIMD on) 53.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.964x (3.6% 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.97x (base 0.96x, +1.3%) 0.88x (base 0.93x, -4.6%) ok
translator (self) 3 0.61x (base 0.62x, -2.3%) 0.84x (base 0.78x, +7.2%) ok
intArithmetic 3 1.05x (base 1.03x, +1.2%) 0.12x (base 0.12x, +1.8%) ok
longArithmetic 3 1.06x (base 1.03x, +3.2%) 0.11x (base 0.07x, +60.0%) ok
mathTranscendental 3 0.99x (base 1.01x, -2.1%) 0.12x (base 0.12x, -0.6%) ok
arraySequential 3 0.44x (base 0.42x, +4.9%) 0.53x (base 0.53x, +0.0%) ok
arrayRandom 3 0.99x (base 0.99x, +0.4%) 0.32x (base 0.32x, -0.0%) ok
objectAllocation 3 1.02x (base 1.11x, -7.4%) 0.89x (base 0.72x, +22.3%) ok
valueEscape 3 0.51x (base 0.51x, -0.0%) 0.08x (base 0.09x, -5.9%) ok
hashMapChurn 3 1.04x (base 1.18x, -11.9%) 0.07x (base 0.07x, +3.6%) ok
stringBuilding 3 0.95x (base 0.84x, +12.3%) 0.45x (base 0.46x, -1.9%) ok
recursion 3 1.23x (base 1.24x, -0.6%) 0.12x (base 0.12x, -0.0%) ok
quicksort 3 0.99x (base 1.01x, -1.8%) 0.11x (base 0.11x, +0.7%) ok

Result: no regression

@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.

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

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

✅ ByteCodeTranslator Quality Report

Test & Coverage

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

Benchmark Results

  • Execution Time: 10460 ms

  • Hotspots (Top 20 sampled methods):

    • 7.72% java.lang.System.identityHashCode (117 samples)
    • 7.52% com.codename1.tools.translator.IteratorEscape.ctorOnlyStoresParamsIntoThis (114 samples)
    • 6.53% java.util.ArrayList.indexOf (99 samples)
    • 6.27% com.codename1.tools.translator.BytecodeMethod.equals (95 samples)
    • 4.22% java.lang.Object.hashCode (64 samples)
    • 2.90% com.codename1.tools.translator.IteratorEscape.mangle (44 samples)
    • 2.90% java.lang.StringBuilder.append (44 samples)
    • 2.51% com.codename1.tools.translator.JavascriptReachability.enqueueResolved (38 samples)
    • 1.91% java.lang.String.equals (29 samples)
    • 1.91% java.util.HashMap.hash (29 samples)
    • 1.85% com.codename1.tools.translator.classfile.analysis.Frame.execute (28 samples)
    • 1.58% java.io.FileOutputStream.writeBytes (24 samples)
    • 1.52% com.codename1.tools.translator.bytecodes.Invoke.resolveDirectTarget (23 samples)
    • 1.45% com.codename1.tools.translator.bytecodes.Invoke.findMethodUp (22 samples)
    • 1.45% com.codename1.tools.translator.ByteCodeClass.hasDeclaredMethod (22 samples)
    • 1.25% com.codename1.tools.translator.NativeSymbolIndex.<init> (19 samples)
    • 1.19% com.codename1.tools.translator.ByteCodeClass.fillVirtualMethodTable (18 samples)
    • 1.19% java.lang.StringCoding.encode (18 samples)
    • 1.12% java.util.AbstractCollection.containsAll (17 samples)
    • 0.99% com.codename1.tools.translator.Parser.cullMethods (15 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.

shai-almog and others added 2 commits November 1, 2026 04:51
The Metal, tvOS and watchOS suites captured these differently on master
before this branch, and the KmpCompat tests had no reference at all.
Taken from run 41192866461's artifacts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
viewSafeAreaInsetsDidChange is not sent to a view a presented controller
covers, so a rotation under one left landscape insets in place once the
app was back in portrait: forms with a safe area were squeezed between
the old notch margins and lost their top inset. The insets are now
refreshed wherever the size is (#6080's cn1PublishViewSizeIfChanged).

The goldens these broken captures replaced go back to the originals;
only the KmpCompat references, which had none, stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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