Skip to content

Fix JavaScript text selection and Android startup - #5952

Open
shai-almog wants to merge 18 commits into
masterfrom
fix/javascript-text-selection-startup
Open

shai-almog wants to merge 18 commits into
masterfrom
fix/javascript-text-selection-startup

Conversation

@shai-almog

Copy link
Copy Markdown
Collaborator

Changes

Fix JavaScript applications hanging during Android theme initialization and make javascript.textSelection=true use browser-native text selection consistently.

  • Resolve null native-font handles to the default font when measuring text. Android theme initialization can measure the initial default font before its native handle is assigned, previously throwing instead of opening the first form.
  • Keep native inputs/textareas over eligible text areas and enable native selection on eligible label spans. Preserve selection and focus across repaints, synchronize edits with the CN1 model, support keyboard traversal, and hide overlays behind dialogs or when components leave the visible form.
  • Route native selection, clipboard, and context-menu events on the browser host so they do not also trigger canvas handlers. Relay wheel scrolling and prompt vertical swipes while retaining native long-press selection. Components with application interaction handlers keep their existing path.
  • Document selection eligibility and CSS highlight customization, and add a translated browser fixture plus event-routing and Unicode regression tests.

The equivalent signed-byte Latin-1 conversion fix for #5944 landed in #5938 while this work was being validated. This branch retains that implementation and adds coverage for all 256 Latin-1 code units, substrings, mixed scripts, emoji, and accented text across focus changes.

Fixes #5943
Fixes #5944
Fixes #5946

Validation

Local validation on the rebased branch:

  • Java 8 core verify: TextAreaTest, TextSelectionTest, and ComponentTest (68 tests).
  • JavascriptRuntimeSemanticsTest#preservesCompactLatin1AndWideStrings across five compiler configurations.
  • node scripts/test-javascript-text-interactions.mjs and node scripts/test-javascript-surface-replay.mjs.
  • Rebuilt the translated fixture with scripts/build-javascript-selection-fixture.sh and ran scripts/test-javascript-text-selection.mjs in Chrome, Firefox, and Android emulator Chrome.
  • Browser checks cover startup/font metrics, Unicode after focus changes, native selection, scrolling, button actions, and dialog restoration. Desktop checks also cover keyboard traversal and the hint-disabled rendering path.
  • git diff --check.

Android long-press and scrolling use CDP touch gestures on the emulator; button/dialog checks use Playwright mouse events. Physical-device and Android Edge coverage remain unverified.

@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-07T02:43:39.213265Z aefa57c Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8fe6cc84e2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread vm/ByteCodeTranslator/src/javascript/browser_bridge.js Outdated
Comment thread vm/ByteCodeTranslator/src/javascript/browser_bridge.js Outdated
Comment thread vm/ByteCodeTranslator/src/javascript/browser_bridge.js Outdated
Comment thread Ports/JavaScriptPort/src/main/java/com/codename1/ui/Accessor.java Outdated
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Cloudflare Preview

@shai-almog

shai-almog commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 172 screenshots: 172 matched.
Native Windows port, REAL shipping pipeline: the hellocodenameone screenshot suite rendered by a binary CROSS-COMPILED on Linux (clang-cl + xwin, WebView2 linked) and RUN on a Windows x64 runner. 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 68ms / native 5ms = 13.6x speedup
SIMD float-mul (64K x300) java 76ms / native 8ms = 9.5x 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 75.000 ms
Base64 CN1 decode 89.000 ms
Base64 SIMD encode 104.000 ms
Base64 encode ratio (SIMD/CN1) 1.387x (38.7% slower)
Base64 SIMD decode 99.000 ms
Base64 decode ratio (SIMD/CN1) 1.112x (11.2% slower)
Image encode benchmark iterations 100
Image createMask (SIMD off) 8.000 ms
Image createMask (SIMD on) 3.000 ms
Image createMask ratio (SIMD on/off) 0.375x (62.5% faster)
Image applyMask (SIMD off) 25.000 ms
Image applyMask (SIMD on) 23.000 ms
Image applyMask ratio (SIMD on/off) 0.920x (8.0% faster)
Image modifyAlpha (SIMD off) 31.000 ms
Image modifyAlpha (SIMD on) 15.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.484x (51.6% faster)
Image modifyAlpha removeColor (SIMD off) 34.000 ms
Image modifyAlpha removeColor (SIMD on) 20.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.588x (41.2% faster)

@github-actions

github-actions Bot commented Oct 6, 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

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1bc707e91b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CodenameOne/src/com/codename1/ui/Component.java Outdated
@shai-almog

shai-almog commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 157 screenshots: 157 matched.

Native Android coverage

  • 📊 Line coverage: 9.81% (9842/100276 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 9.56% (50597/529231), branch 3.90% (1958/50159), complexity 3.85% (2059/53441), method 6.00% (1686/28093), class 12.02% (455/3785)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6367 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.ClassReader – 0.00% (0/1524 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1187 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.MethodWriter – 0.00% (0/922 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/736 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/625 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.Frame – 0.00% (0/570 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 9.81% (9842/100276 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 9.56% (50597/529231), branch 3.90% (1958/50159), complexity 3.85% (2059/53441), method 6.00% (1686/28093), class 12.02% (455/3785)
    • Lowest covered classes
      • kotlin.collections.kotlin.collections.ArraysKt___ArraysKt – 0.00% (0/6367 lines covered)
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2384 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.ClassReader – 0.00% (0/1524 lines covered)
      • kotlin.collections.kotlin.collections.CollectionsKt___CollectionsKt – 0.00% (0/1187 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.MethodWriter – 0.00% (0/922 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/736 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/625 lines covered)
      • org.jacoco.agent.rt.internal_0e20598.asm.org.jacoco.agent.rt.internal_0e20598.asm.Frame – 0.00% (0/570 lines covered)

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend scalar fallback (no native SIMD)
SIMD int-add (64K x300) java 141ms / native 74ms = 1.9x speedup
SIMD float-mul (64K x300) java 106ms / native 85ms = 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 81.000 ms
Base64 CN1 decode 67.000 ms
Base64 native encode 320.000 ms
Base64 encode ratio (CN1/native) 0.253x (74.7% faster)
Base64 native decode 235.000 ms
Base64 decode ratio (CN1/native) 0.285x (71.5% faster)
Image encode benchmark status skipped (SIMD unsupported)

@shai-almog

shai-almog commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

@shai-almog

shai-almog commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 172 screenshots: 172 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 58ms / native 4ms = 14.5x speedup
SIMD float-mul (64K x300) java 63ms / native 4ms = 15.7x 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 73.000 ms
Base64 CN1 decode 89.000 ms
Base64 SIMD encode 101.000 ms
Base64 encode ratio (SIMD/CN1) 1.384x (38.4% slower)
Base64 SIMD decode 102.000 ms
Base64 decode ratio (SIMD/CN1) 1.146x (14.6% 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) 26.000 ms
Image applyMask (SIMD on) 34.000 ms
Image applyMask ratio (SIMD on/off) 1.308x (30.8% slower)
Image modifyAlpha (SIMD off) 35.000 ms
Image modifyAlpha (SIMD on) 23.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.657x (34.3% faster)
Image modifyAlpha removeColor (SIMD off) 43.000 ms
Image modifyAlpha removeColor (SIMD on) 27.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.628x (37.2% faster)

ParparVM vs HotSpot (JDK 25): Windows x64

Runner CPU: Intel64 Family 6 Model 106 Stepping 6, GenuineIntel (baseline windows-x64@intel64-family-6-model-106-genuineintel)

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 15% (time) / 15% (RAM) away from its baseline in vm/selfhost/perf-baseline/ fails: above it is a regression, below it an improvement that has to be rebaselined (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.24x (base 1.21x, +2.4%) 0.69x (base 0.76x, -8.8%) ok
translator (self) 4 0.65x (base 0.63x, +3.4%) 0.50x (base 0.54x, -7.6%) ok
intArithmetic 4 1.03x (base 1.03x, -0.0%) 0.06x (base 0.06x, +1.4%) ok
longArithmetic 4 1.00x (base 1.00x, -0.1%) 0.05x (base 0.05x, +1.1%) ok
mathTranscendental 4 0.81x (base 0.81x, -0.3%) 0.06x (base 0.06x, -0.0%) ok
arraySequential 4 1.60x (base 1.43x, +12.4%) 0.38x (base 0.38x, +0.0%) ok
arrayRandom 4 1.01x (base 1.00x, +1.3%) 0.23x (base 0.23x, +0.2%) ok
objectAllocation 4 1.19x (base 1.21x, -1.5%) 0.34x (base 0.32x, +6.6%) ok
valueEscape 4 0.13x (base 0.13x, -0.1%) 0.04x (base 0.04x, +1.6%) ok
hashMapChurn 4 1.17x (base 1.21x, -3.4%) 0.09x (base 0.10x, -9.5%) ok
stringBuilding 4 1.37x (base 1.44x, -4.8%) 0.27x (base 0.27x, -0.7%) ok
recursion 4 1.18x (base 1.26x, -6.4%) 0.06x (base 0.06x, +0.5%) ok
quicksort 4 1.10x (base 1.11x, -0.9%) 0.12x (base 0.12x, +0.3%) ok

Result: no regression

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

✅ Continuous Quality Report

Test & Coverage

  • ❌ Tests: 7520 total, 2 failed, 0 skipped
  • ⚠️ 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

shai-almog commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 172 screenshots: 172 matched.
Native Linux port (x64), GTK3/Cairo/Pango, ParparVM bytecode-to-C (no JVM): the hellocodenameone screenshot suite rendered by a native ELF built + run on the GitHub x64 runner. Baseline: scripts/linux/screenshots.

ParparVM vs HotSpot (JDK 25): Linux x64

Runner CPU: Intel(R) Xeon(R) 6973P-C (baseline linux-x64@intel-xeon-6973p-c)

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 15% (time) / 15% (RAM) away from its baseline in vm/selfhost/perf-baseline/ fails: above it is a regression, below it an improvement that has to be rebaselined (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 (LinuxHelloMain) 4 1.01x (base 0.98x, +2.8%) 0.81x (base 0.77x, +5.0%) ok
translator (self) 4 0.60x (base 0.54x, +11.7%) 0.45x (base 0.52x, -14.1%) ok
intArithmetic 4 1.02x (base 1.01x, +0.6%) 0.05x (base 0.05x, +1.5%) ok
longArithmetic 4 1.06x (base 1.07x, -0.2%) 0.07x (base 0.06x, +31.6%) ok
mathTranscendental 4 1.03x (base 1.03x, +0.4%) 0.08x (base 0.06x, +33.0%) ok
arraySequential 4 2.03x (base 2.13x, -4.6%) 0.37x (base 0.36x, +5.1%) ok
arrayRandom 4 1.04x (base 1.01x, +2.7%) 0.21x (base 0.21x, +0.1%) ok
objectAllocation 4 1.82x (base 1.94x, -6.3%) 0.29x (base 0.38x, -23.8%) ok
valueEscape 4 0.13x (base 0.13x, +0.4%) 0.05x (base 0.05x, -2.1%) ok
hashMapChurn 4 0.98x (base 1.02x, -3.9%) 0.10x (base 0.10x, +3.6%) ok
stringBuilding 4 1.38x (base 1.66x, -17.0%) 0.22x (base 0.22x, -0.0%) ok
recursion 4 1.45x (base 1.30x, +11.3%) 0.06x (base 0.07x, -25.7%) ok
quicksort 4 1.04x (base 1.10x, -5.0%) 0.13x (base 0.13x, +1.8%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 172 screenshots: 172 matched.
Native Linux port (arm64), GTK3/Cairo/Pango, ParparVM bytecode-to-C (no JVM): the hellocodenameone screenshot suite rendered by a native ELF built + run on the GitHub arm64 runner. Baseline: scripts/linux/screenshots-arm.

ParparVM vs HotSpot (JDK 25): Linux arm64

Runner CPU: Neoverse-N2 (baseline linux-arm64@neoverse-n2)

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 15% (time) / 15% (RAM) away from its baseline in vm/selfhost/perf-baseline/ fails: above it is a regression, below it an improvement that has to be rebaselined (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 (LinuxHelloMain) 4 0.98x (base 0.93x, +4.8%) 0.84x (base 0.87x, -3.3%) ok
translator (self) 4 0.70x (base 0.70x, -0.3%) 0.44x (base 0.45x, -2.0%) ok
intArithmetic 4 1.04x (base 1.04x, -0.1%) 0.03x (base 0.03x, +0.4%) ok
longArithmetic 4 0.79x (base 0.79x, -0.1%) 0.03x (base 0.03x, +0.2%) ok
mathTranscendental 4 1.10x (base 1.10x, +0.0%) 0.03x (base 0.03x, -2.5%) ok
arraySequential 4 0.36x (base 0.36x, -1.0%) 0.37x (base 0.37x, -0.1%) ok
arrayRandom 4 0.93x (base 0.94x, -0.4%) 0.20x (base 0.20x, -0.2%) ok
objectAllocation 4 1.91x (base 1.77x, +8.2%) 0.36x (base 0.38x, -3.4%) ok
valueEscape 4 0.51x (base 0.51x, -0.1%) 0.03x (base 0.03x, +0.1%) ok
hashMapChurn 4 0.85x (base 0.84x, +0.4%) 0.11x (base 0.12x, -5.0%) ok
stringBuilding 4 1.32x (base 1.36x, -3.3%) 0.32x (base 0.26x, +20.6%) ok
recursion 4 1.56x (base 1.43x, +8.5%) 0.03x (base 0.04x, -1.3%) ok
quicksort 4 0.99x (base 0.99x, -0.2%) 0.09x (base 0.09x, +0.7%) ok

Result: no regression

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

✅ ByteCodeTranslator Quality Report

Test & Coverage

  • ✅ Tests: 806 total, 0 failed, 57 skipped

Benchmark Results

  • Execution Time: 17478 ms

  • Hotspots (Top 20 sampled methods):

    • 10.99% com.codename1.tools.translator.BytecodeMethod.equals (180 samples)
    • 6.11% com.codename1.tools.translator.IteratorEscape.mangle (100 samples)
    • 4.46% java.lang.StringBuilder.append (73 samples)
    • 2.56% java.util.ArrayList.indexOf (42 samples)
    • 2.38% java.lang.String.equals (39 samples)
    • 2.26% java.util.AbstractCollection.containsAll (37 samples)
    • 2.20% com.codename1.tools.translator.NativeSymbolIndex.<init> (36 samples)
    • 2.14% java.lang.System.identityHashCode (35 samples)
    • 2.14% java.util.HashMap.putVal (35 samples)
    • 2.08% com.codename1.tools.translator.IteratorEscape.ctorOnlyStoresParamsIntoThis (34 samples)
    • 2.08% com.codename1.tools.translator.JavascriptReachability.enqueueResolved (34 samples)
    • 1.95% java.lang.Object.hashCode (32 samples)
    • 1.65% com.codename1.tools.translator.ByteCodeClass.hasDeclaredMethod (27 samples)
    • 1.53% com.codename1.tools.translator.BytecodeMethod.updateInlinableFieldDependencies (25 samples)
    • 1.47% com.codename1.tools.translator.bytecodes.Invoke.resolveDirectTarget (24 samples)
    • 1.47% com.codename1.tools.translator.bytecodes.Invoke.findMethodUp (24 samples)
    • 1.40% com.codename1.tools.translator.BytecodeMethod.optimize (23 samples)
    • 1.28% com.codename1.tools.translator.BytecodeMethod.appendMethodSignatureSuffixFromDesc (21 samples)
    • 1.10% com.codename1.tools.translator.IteratorEscape.walk (18 samples)
    • 1.10% java.util.HashMap.hash (18 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

shai-almog commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 172 screenshots: 172 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 2ms = 25.0x speedup
SIMD float-mul (64K x300) java 49ms / native 2ms = 24.5x 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 62.000 ms
Base64 CN1 decode 70.000 ms
Base64 SIMD encode 77.000 ms
Base64 encode ratio (SIMD/CN1) 1.242x (24.2% slower)
Base64 SIMD decode 73.000 ms
Base64 decode ratio (SIMD/CN1) 1.043x (4.3% slower)
Image encode benchmark iterations 100
Image createMask (SIMD off) 5.000 ms
Image createMask (SIMD on) 1.000 ms
Image createMask ratio (SIMD on/off) 0.200x (80.0% faster)
Image applyMask (SIMD off) 19.000 ms
Image applyMask (SIMD on) 19.000 ms
Image applyMask ratio (SIMD on/off) 1.000x (0.0% slower)
Image modifyAlpha (SIMD off) 17.000 ms
Image modifyAlpha (SIMD on) 14.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.824x (17.6% faster)
Image modifyAlpha removeColor (SIMD off) 23.000 ms
Image modifyAlpha removeColor (SIMD on) 14.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.609x (39.1% 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 15% (time) / 15% (RAM) away from its baseline in vm/selfhost/perf-baseline/ fails: above it is a regression, below it an improvement that has to be rebaselined (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.10x (base 1.11x, -0.9%) 0.80x (base 0.90x, -11.0%) ok
translator (self) 4 0.80x (base 0.75x, +7.1%) 0.44x (base 0.45x, -1.9%) ok
intArithmetic 4 1.04x (base 1.04x, +0.0%) 0.06x (base 0.06x, +1.5%) ok
longArithmetic 4 0.79x (base 0.80x, -0.0%) 0.06x (base 0.06x, +1.6%) ok
mathTranscendental 4 0.68x (base 0.72x, -5.5%) 0.06x (base 0.06x, +0.5%) ok
arraySequential 4 0.37x (base 0.46x, -17.8%) 0.39x (base 0.39x, -0.1%) ok
arrayRandom 4 0.94x (base 0.94x, +0.1%) 0.23x (base 0.23x, +0.0%) ok
objectAllocation 4 1.79x (base 2.81x, -36.2%) 0.41x (base 0.43x, -4.6%) ok
valueEscape 4 0.76x (base 0.76x, +0.0%) 0.05x (base 0.05x, +1.1%) ok
hashMapChurn 4 0.99x (base 0.98x, +0.8%) 0.11x (base 0.12x, -8.7%) ok
stringBuilding 4 1.40x (base 1.43x, -2.1%) 0.27x (base 0.27x, -0.3%) ok
recursion 4 1.46x (base 1.46x, -0.1%) 0.06x (base 0.07x, -0.4%) ok
quicksort 4 1.01x (base 1.00x, +0.8%) 0.12x (base 0.12x, -0.1%) ok

Result: no regression

@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cd1dec4792

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CodenameOne/src/com/codename1/ui/Component.java Outdated
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9137d02aac

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CodenameOne/src/com/codename1/ui/Component.java Outdated
Comment thread vm/ByteCodeTranslator/src/javascript/browser_bridge.js Outdated
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 82d4cfa017

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 586b58302c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CodenameOne/src/com/codename1/ui/Component.java
Comment thread Ports/JavaScriptPort/src/main/java/com/codename1/ui/Accessor.java Outdated
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 88df949265

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Ports/JavaScriptPort/src/main/java/com/codename1/ui/Accessor.java Outdated
Comment thread vm/ByteCodeTranslator/src/javascript/browser_bridge.js Outdated
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 395e696141

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Ports/JavaScriptPort/src/main/java/com/codename1/ui/Accessor.java
Comment thread vm/ByteCodeTranslator/src/javascript/browser_bridge.js Outdated
@shai-almog

shai-almog commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 223 screenshots: 223 matched.
✅ Native Apple Watch (watchOS, Core Graphics) screenshot tests passed.

@shai-almog

shai-almog commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 155 screenshots: 155 matched.
✅ Native iOS Metal screenshot tests passed.

Benchmark Results

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

Build and Run Timing

Metric Duration
Simulator Boot 81000 ms
Simulator Boot (Run) 1000 ms
App Install 17000 ms
App Launch 7000 ms
Test Execution 413000 ms

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 67ms / native 7ms = 9.5x speedup
SIMD float-mul (64K x300) java 61ms / native 3ms = 20.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 72.000 ms
Base64 CN1 decode 78.000 ms
Base64 native encode 1553.000 ms
Base64 encode ratio (CN1/native) 0.046x (95.4% faster)
Base64 native decode 1020.000 ms
Base64 decode ratio (CN1/native) 0.076x (92.4% faster)
Base64 SIMD encode 74.000 ms
Base64 encode ratio (SIMD/CN1) 1.028x (2.8% slower)
Base64 SIMD decode 75.000 ms
Base64 decode ratio (SIMD/CN1) 0.962x (3.8% faster)
Base64 encode ratio (SIMD/native) 0.048x (95.2% faster)
Base64 decode ratio (SIMD/native) 0.074x (92.6% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 15.000 ms
Image createMask (SIMD on) 3.000 ms
Image createMask ratio (SIMD on/off) 0.200x (80.0% faster)
Image applyMask (SIMD off) 97.000 ms
Image applyMask (SIMD on) 67.000 ms
Image applyMask ratio (SIMD on/off) 0.691x (30.9% faster)
Image modifyAlpha (SIMD off) 58.000 ms
Image modifyAlpha (SIMD on) 107.000 ms
Image modifyAlpha ratio (SIMD on/off) 1.845x (84.5% slower)
Image modifyAlpha removeColor (SIMD off) 307.000 ms
Image modifyAlpha removeColor (SIMD on) 41.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.134x (86.6% faster)

@shai-almog

shai-almog commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 155 screenshots: 155 matched.
✅ Native iOS Metal screenshot tests passed.

Benchmark Results

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

Build and Run Timing

Metric Duration
Simulator Boot 0 ms
Simulator Boot (Run) 1000 ms
App Install 22000 ms
App Launch 15000 ms
Test Execution 429000 ms

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 158ms / native 3ms = 52.6x speedup
SIMD float-mul (64K x300) java 173ms / native 8ms = 21.6x 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 153.000 ms
Base64 CN1 decode 131.000 ms
Base64 native encode 1873.000 ms
Base64 encode ratio (CN1/native) 0.082x (91.8% faster)
Base64 native decode 1502.000 ms
Base64 decode ratio (CN1/native) 0.087x (91.3% faster)
Base64 SIMD encode 105.000 ms
Base64 encode ratio (SIMD/CN1) 0.686x (31.4% faster)
Base64 SIMD decode 105.000 ms
Base64 decode ratio (SIMD/CN1) 0.802x (19.8% faster)
Base64 encode ratio (SIMD/native) 0.056x (94.4% faster)
Base64 decode ratio (SIMD/native) 0.070x (93.0% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 12.000 ms
Image createMask (SIMD on) 4.000 ms
Image createMask ratio (SIMD on/off) 0.333x (66.7% faster)
Image applyMask (SIMD off) 89.000 ms
Image applyMask (SIMD on) 77.000 ms
Image applyMask ratio (SIMD on/off) 0.865x (13.5% faster)
Image modifyAlpha (SIMD off) 85.000 ms
Image modifyAlpha (SIMD on) 66.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.776x (22.4% faster)
Image modifyAlpha removeColor (SIMD off) 349.000 ms
Image modifyAlpha removeColor (SIMD on) 41.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.117x (88.3% faster)

@shai-almog

shai-almog commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 150 screenshots: 150 matched.
✅ Native Apple TV (tvOS, Metal) screenshot tests passed.

@shai-almog

shai-almog commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

Benchmark Results

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

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 79ms / native 2ms = 39.5x speedup
SIMD float-mul (64K x300) java 56ms / native 5ms = 11.2x 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 64.000 ms
Base64 CN1 decode 67.000 ms
Image encode benchmark iterations 100
Image createMask (SIMD off) 8.000 ms
Image createMask (SIMD on) 6.000 ms
Image createMask ratio (SIMD on/off) 0.750x (25.0% faster)
Image applyMask (SIMD off) 81.000 ms
Image applyMask (SIMD on) 79.000 ms
Image applyMask ratio (SIMD on/off) 0.975x (2.5% faster)
Image modifyAlpha (SIMD off) 70.000 ms
Image modifyAlpha (SIMD on) 54.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.771x (22.9% faster)
Image modifyAlpha removeColor (SIMD off) 63.000 ms
Image modifyAlpha removeColor (SIMD on) 63.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 1.000x (0.0% slower)

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 15% (time) / 15% (RAM) away from its baseline in vm/selfhost/perf-baseline/ fails: above it is a regression, below it an improvement that has to be rebaselined (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.80x (base 0.96x, -15.9%) 1.31x (base 1.34x, -2.0%) ok
translator (self) 3 0.65x (base 0.62x, +4.1%) 0.61x (base 0.57x, +7.5%) ok
intArithmetic 3 1.06x (base 1.03x, +2.7%) 0.12x (base 0.12x, +1.1%) ok
longArithmetic 3 1.07x (base 1.03x, +4.0%) 0.12x (base 0.07x, +66.2%) ok
mathTranscendental 3 0.93x (base 1.01x, -7.8%) 0.12x (base 0.12x, +0.2%) ok
arraySequential 3 0.45x (base 0.42x, +7.4%) 0.53x (base 0.53x, -0.3%) ok
arrayRandom 3 0.98x (base 0.99x, -0.8%) 0.32x (base 0.32x, -0.0%) ok
objectAllocation 3 1.07x (base 1.11x, -3.6%) 0.69x (base 0.71x, -2.2%) ok
valueEscape 3 0.48x (base 0.51x, -6.1%) 0.09x (base 0.09x, -1.7%) ok
hashMapChurn 3 0.90x (base 1.18x, -23.7%) 0.08x (base 0.07x, +18.0%) ok
stringBuilding 3 0.72x (base 0.84x, -14.4%) 0.53x (base 0.46x, +14.6%) ok
recursion 3 1.27x (base 1.24x, +3.2%) 0.12x (base 0.12x, -0.1%) ok
quicksort 3 0.98x (base 1.01x, -3.0%) 0.11x (base 0.11x, +0.3%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

Benchmark Results

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

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 53ms / native 3ms = 17.6x speedup
SIMD float-mul (64K x300) java 60ms / native 3ms = 20.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 53.000 ms
Base64 CN1 decode 65.000 ms
Base64 native encode 578.000 ms
Base64 encode ratio (CN1/native) 0.092x (90.8% faster)
Base64 native decode 257.000 ms
Base64 decode ratio (CN1/native) 0.253x (74.7% faster)
Base64 SIMD encode 52.000 ms
Base64 encode ratio (SIMD/CN1) 0.981x (1.9% faster)
Base64 SIMD decode 48.000 ms
Base64 decode ratio (SIMD/CN1) 0.738x (26.2% faster)
Base64 encode ratio (SIMD/native) 0.090x (91.0% faster)
Base64 decode ratio (SIMD/native) 0.187x (81.3% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 7.000 ms
Image createMask (SIMD on) 2.000 ms
Image createMask ratio (SIMD on/off) 0.286x (71.4% faster)
Image applyMask (SIMD off) 44.000 ms
Image applyMask (SIMD on) 47.000 ms
Image applyMask ratio (SIMD on/off) 1.068x (6.8% slower)
Image modifyAlpha (SIMD off) 32.000 ms
Image modifyAlpha (SIMD on) 26.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.813x (18.8% faster)
Image modifyAlpha removeColor (SIMD off) 31.000 ms
Image modifyAlpha removeColor (SIMD on) 50.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 1.613x (61.3% slower)

@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 11ca28fa5d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Ports/JavaScriptPort/src/main/java/com/codename1/ui/Accessor.java
Comment thread vm/ByteCodeTranslator/src/javascript/browser_bridge.js Outdated
@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant