Skip to content

Add backend transaction synchronization and isolation - #6012

Open
shai-almog wants to merge 4 commits into
masterfrom
backend-transaction-synchronization
Open

shai-almog wants to merge 4 commits into
masterfrom
backend-transaction-synchronization

Conversation

@shai-almog

Copy link
Copy Markdown
Collaborator

Backend transactions currently cannot coordinate commit-dependent cache/event work or bind application resources to a transaction, and callers cannot select isolation. This adds synchronization hooks, transaction-scoped resources, and explicit isolation to declarative and programmatic transactions.

  • Add ordered before-commit, after-commit, and after-completion hooks with COMMITTED, ROLLED_BACK, and UNKNOWN outcomes. Callback failures preserve cleanup; failed commit attempts never run after-commit hooks.
  • Keep resources and hooks with the physical transaction across REQUIRED participation and REQUIRES_NEW suspension. Savepoint rollback suppresses commit hooks registered within that nested scope while retaining final completion cleanup.
  • Add Isolation to @Transactional, generated transaction wrappers, and programmatic APIs. Validate incompatible joins and unsupported engine levels; apply transaction-local settings without changing pooled connection defaults.
  • Document lifecycle and failure semantics and add JVM regressions plus a standalone local ParparVM probe.

Validation:

  • Java 8 backend verify: 44 tests passed, including SQLite transaction regressions and live PostgreSQL isolation/ORM checks; six MySQL cases skipped because no server was available.
  • All 86 BackendBeansTest tests passed, including generated declarative isolation and method-level override coverage.
  • Backend SpotBugs and Checkstyle checks passed with zero reported bugs/errors or violations; git diff --check passed.
  • The same standalone probe passed locally on Java 8 and the translated ParparVM binary: 13 checks on SQLite and 14 on PostgreSQL.
  • Broader backend run: 935 tests, one HTTP session test failure, 39 skips. ApplicationRuntimeTest.concurrentRequestKeepsTheLoginsRotation received an HTTP 404 during setup; its isolated rerun passed. The full suite was not rerun.

Closes #5988

@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 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 ✅ Completed 2026-10-12T18:49:40.843518Z f8e878e 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

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 4f6d85eb2c

ℹ️ 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".

@github-actions

github-actions Bot commented Oct 12, 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: 0d843103c6

ℹ️ 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/backend/src/com/codename1/backend/Transactions.java
@github-actions

Copy link
Copy Markdown
Contributor

Cloudflare Preview

@shai-almog

shai-almog commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 170 screenshots: 170 matched.

Native Android coverage

  • 📊 Line coverage: 16.01% (26002/162390 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 14.37% (122147/850229), branch 9.91% (8467/85441), complexity 7.82% (6526/83503), method 11.59% (4648/40094), class 19.78% (960/4853)
    • 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)
      • 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)
      • com.codename1.androidcompat.rt.com.codename1.androidcompat.rt.TextXmlPullParser – 0.00% (0/623 lines covered)
      • com.codename1.androidcompat.androidx.constraintlayout.core.widgets.com.codename1.androidcompat.androidx.constraintlayout.core.widgets.Flow – 0.00% (0/576 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 16.01% (26002/162390 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 14.37% (122147/850229), branch 9.91% (8467/85441), complexity 7.82% (6526/83503), method 11.59% (4648/40094), class 19.78% (960/4853)
    • 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)
      • 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)
      • com.codename1.androidcompat.rt.com.codename1.androidcompat.rt.TextXmlPullParser – 0.00% (0/623 lines covered)
      • com.codename1.androidcompat.androidx.constraintlayout.core.widgets.com.codename1.androidcompat.androidx.constraintlayout.core.widgets.Flow – 0.00% (0/576 lines covered)

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend scalar fallback (no native SIMD)
SIMD int-add (64K x300) java 186ms / native 179ms = 1.0x speedup
SIMD float-mul (64K x300) java 120ms / native 131ms = 0.9x 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 113.000 ms
Base64 CN1 decode 85.000 ms
Base64 native encode 381.000 ms
Base64 encode ratio (CN1/native) 0.297x (70.3% faster)
Base64 native decode 275.000 ms
Base64 decode ratio (CN1/native) 0.309x (69.1% faster)
Image encode benchmark status skipped (SIMD unsupported)

@shai-almog

shai-almog commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: f8e878ece6

ℹ️ 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

shai-almog commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 185 screenshots: 185 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 56ms / native 4ms = 14.0x speedup
SIMD float-mul (64K x300) java 57ms / native 4ms = 14.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 gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 73.000 ms
Base64 CN1 decode 90.000 ms
Base64 SIMD encode 112.000 ms
Base64 encode ratio (SIMD/CN1) 1.534x (53.4% slower)
Base64 SIMD decode 99.000 ms
Base64 decode ratio (SIMD/CN1) 1.100x (10.0% 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) 21.000 ms
Image applyMask (SIMD on) 22.000 ms
Image applyMask ratio (SIMD on/off) 1.048x (4.8% slower)
Image modifyAlpha (SIMD off) 28.000 ms
Image modifyAlpha (SIMD on) 19.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.679x (32.1% faster)
Image modifyAlpha removeColor (SIMD off) 34.000 ms
Image modifyAlpha removeColor (SIMD on) 17.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.500x (50.0% faster)

@shai-almog

shai-almog commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 185 screenshots: 185 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 56ms / native 5ms = 11.2x speedup
SIMD float-mul (64K x300) java 63ms / native 5ms = 12.6x 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 74.000 ms
Base64 CN1 decode 89.000 ms
Base64 SIMD encode 110.000 ms
Base64 encode ratio (SIMD/CN1) 1.486x (48.6% slower)
Base64 SIMD decode 106.000 ms
Base64 decode ratio (SIMD/CN1) 1.191x (19.1% slower)
Image encode benchmark iterations 100
Image createMask (SIMD off) 19.000 ms
Image createMask (SIMD on) 3.000 ms
Image createMask ratio (SIMD on/off) 0.158x (84.2% faster)
Image applyMask (SIMD off) 36.000 ms
Image applyMask (SIMD on) 47.000 ms
Image applyMask ratio (SIMD on/off) 1.306x (30.6% slower)
Image modifyAlpha (SIMD off) 46.000 ms
Image modifyAlpha (SIMD on) 28.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.609x (39.1% faster)
Image modifyAlpha removeColor (SIMD off) 48.000 ms
Image modifyAlpha removeColor (SIMD on) 32.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.667x (33.3% faster)

ParparVM vs HotSpot (JDK 25): Windows x64

Runner CPU: AMD64 Family 25 Model 1 Stepping 1, AuthenticAMD (baseline windows-x64@amd64-family-25-model-1-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 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.37x (base 1.22x, +12.1%) 0.88x (base 0.94x, -6.5%) ok
translator (self) 4 0.54x (base 0.60x, -10.3%) 0.59x (base 0.54x, +9.4%) ok
intArithmetic 4 1.16x (base 1.10x, +5.3%) 0.06x (base 0.06x, +5.1%) ok
longArithmetic 4 1.08x (base 1.08x, -0.0%) 0.05x (base 0.05x, +1.2%) ok
mathTranscendental 4 0.75x (base 0.79x, -5.4%) 0.06x (base 0.06x, +0.5%) ok
arraySequential 4 1.38x (base 1.36x, +1.2%) 0.39x (base 0.39x, +0.3%) ok
arrayRandom 4 1.04x (base 1.06x, -1.8%) 0.23x (base 0.23x, -0.0%) ok
objectAllocation 4 1.57x (base 1.56x, +0.9%) 0.28x (base 0.39x, -27.5%) ok
valueEscape 4 0.10x (base 0.10x, +0.4%) 0.04x (base 0.04x, +1.4%) ok
hashMapChurn 4 1.76x (base 1.80x, -2.0%) 0.09x (base 0.09x, -2.1%) ok
stringBuilding 4 1.31x (base 1.22x, +7.7%) 0.33x (base 0.32x, +3.3%) ok
recursion 4 1.38x (base 1.49x, -7.5%) 0.06x (base 0.06x, -0.8%) ok
quicksort 4 1.09x (base 1.13x, -3.5%) 0.12x (base 0.12x, +0.0%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 185 screenshots: 185 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 63.000 ms
Base64 CN1 decode 73.000 ms
Base64 SIMD encode 74.000 ms
Base64 encode ratio (SIMD/CN1) 1.175x (17.5% slower)
Base64 SIMD decode 73.000 ms
Base64 decode ratio (SIMD/CN1) 1.000x (0.0% 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) 20.000 ms
Image applyMask ratio (SIMD on/off) 1.053x (5.3% slower)
Image modifyAlpha (SIMD off) 17.000 ms
Image modifyAlpha (SIMD on) 12.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.706x (29.4% faster)
Image modifyAlpha removeColor (SIMD off) 21.000 ms
Image modifyAlpha removeColor (SIMD on) 12.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.571x (42.9% 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.7%) 0.94x (base 0.97x, -3.2%) ok
translator (self) 4 0.84x (base 0.84x, +0.2%) 0.48x (base 0.45x, +6.1%) ok
intArithmetic 4 1.04x (base 1.04x, -0.0%) 0.06x (base 0.06x, +1.6%) ok
longArithmetic 4 0.79x (base 0.80x, -0.3%) 0.06x (base 0.06x, +2.1%) ok
mathTranscendental 4 0.73x (base 0.72x, +1.4%) 0.06x (base 0.06x, +0.5%) ok
arraySequential 4 0.39x (base 0.46x, -15.0%) 0.39x (base 0.39x, -0.1%) ok
arrayRandom 4 0.94x (base 0.94x, +0.3%) 0.23x (base 0.23x, +0.1%) ok
objectAllocation 4 1.76x (base 2.81x, -37.4%) 0.42x (base 0.43x, -2.6%) ok
valueEscape 4 0.76x (base 0.76x, +0.0%) 0.05x (base 0.05x, +0.3%) ok
hashMapChurn 4 0.97x (base 0.98x, -1.1%) 0.12x (base 0.12x, -1.2%) ok
stringBuilding 4 1.52x (base 1.43x, +6.2%) 0.27x (base 0.27x, +0.2%) ok
recursion 4 1.46x (base 1.46x, +0.0%) 0.06x (base 0.07x, -0.2%) ok
quicksort 4 1.01x (base 1.00x, +0.6%) 0.12x (base 0.12x, -0.0%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 185 screenshots: 185 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 0.97x (base 0.98x, -1.2%) 0.95x (base 0.93x, +2.1%) ok
translator (self) 4 0.63x (base 0.54x, +16.9%) 0.47x (base 0.52x, -10.2%) ok
intArithmetic 4 1.02x (base 1.01x, +0.6%) 0.05x (base 0.05x, +1.4%) ok
longArithmetic 4 1.06x (base 1.07x, -0.4%) 0.05x (base 0.06x, -0.2%) ok
mathTranscendental 4 1.03x (base 1.03x, +0.4%) 0.08x (base 0.06x, +35.0%) ok
arraySequential 4 2.06x (base 2.13x, -3.0%) 0.36x (base 0.36x, -0.3%) ok
arrayRandom 4 1.00x (base 1.01x, -0.9%) 0.21x (base 0.21x, -0.6%) ok
objectAllocation 4 1.96x (base 1.94x, +1.1%) 0.30x (base 0.38x, -22.6%) ok
valueEscape 4 0.13x (base 0.13x, +0.5%) 0.05x (base 0.05x, -3.0%) ok
hashMapChurn 4 1.00x (base 1.02x, -1.8%) 0.10x (base 0.10x, +2.8%) ok
stringBuilding 4 1.60x (base 1.66x, -3.3%) 0.22x (base 0.22x, -0.1%) ok
recursion 4 1.18x (base 1.30x, -9.3%) 0.06x (base 0.07x, -25.9%) ok
quicksort 4 1.09x (base 1.10x, -0.9%) 0.11x (base 0.13x, -13.1%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 185 screenshots: 185 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 1.00x (base 0.93x, +7.0%) 0.93x (base 0.87x, +6.6%) ok
translator (self) 4 0.72x (base 0.70x, +3.3%) 0.48x (base 0.45x, +6.4%) ok
intArithmetic 4 1.05x (base 1.04x, +0.0%) 0.03x (base 0.03x, +0.1%) ok
longArithmetic 4 0.79x (base 0.79x, -0.1%) 0.03x (base 0.03x, -0.5%) ok
mathTranscendental 4 1.10x (base 1.10x, -0.0%) 0.03x (base 0.03x, +1.0%) ok
arraySequential 4 0.35x (base 0.36x, -4.4%) 0.37x (base 0.37x, +0.0%) ok
arrayRandom 4 0.94x (base 0.94x, +0.1%) 0.20x (base 0.20x, -0.2%) ok
objectAllocation 4 1.75x (base 1.77x, -0.8%) 0.37x (base 0.38x, -3.1%) ok
valueEscape 4 0.51x (base 0.51x, -0.1%) 0.03x (base 0.03x, -0.7%) ok
hashMapChurn 4 0.85x (base 0.84x, +0.7%) 0.12x (base 0.12x, +2.5%) ok
stringBuilding 4 1.39x (base 1.36x, +2.1%) 0.26x (base 0.26x, -0.3%) ok
recursion 4 1.55x (base 1.43x, +8.3%) 0.03x (base 0.04x, -2.1%) ok
quicksort 4 1.00x (base 0.99x, +0.8%) 0.09x (base 0.09x, +0.1%) ok

Result: no regression

@github-actions

github-actions Bot commented Oct 12, 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)
    • ✅ core-unittests: 0 findings (no issues)
    • ✅ ios: 0 findings (no issues)
    • ✅ javac: 0 findings (no issues)
    • ✅ project-model: 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 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

Benchmark Results

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

Build and Run Timing

Metric Duration
Simulator Boot 1000 ms
Simulator Boot (Run) 1000 ms
App Install 15000 ms
App Launch 4000 ms
Test Execution 455000 ms

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 173ms / native 4ms = 43.2x speedup
SIMD float-mul (64K x300) java 227ms / native 34ms = 6.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 111.000 ms
Base64 CN1 decode 72.000 ms
Base64 native encode 2521.000 ms
Base64 encode ratio (CN1/native) 0.044x (95.6% faster)
Base64 native decode 1367.000 ms
Base64 decode ratio (CN1/native) 0.053x (94.7% faster)
Base64 SIMD encode 72.000 ms
Base64 encode ratio (SIMD/CN1) 0.649x (35.1% faster)
Base64 SIMD decode 72.000 ms
Base64 decode ratio (SIMD/CN1) 1.000x (0.0% slower)
Base64 encode ratio (SIMD/native) 0.029x (97.1% faster)
Base64 decode ratio (SIMD/native) 0.053x (94.7% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 9.000 ms
Image createMask (SIMD on) 256.000 ms
Image createMask ratio (SIMD on/off) 28.444x (2744.4% slower)
Image applyMask (SIMD off) 377.000 ms
Image applyMask (SIMD on) 34.000 ms
Image applyMask ratio (SIMD on/off) 0.090x (91.0% faster)
Image modifyAlpha (SIMD off) 105.000 ms
Image modifyAlpha (SIMD on) 77.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.733x (26.7% faster)
Image modifyAlpha removeColor (SIMD off) 92.000 ms
Image modifyAlpha removeColor (SIMD on) 377.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 4.098x (309.8% slower)

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

✅ ByteCodeTranslator Quality Report

Test & Coverage

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

Benchmark Results

  • Execution Time: 4824 ms

  • Hotspots (Top 20 sampled methods):

    • 8.15% com.codename1.tools.translator.BytecodeMethod.equals (53 samples)
    • 6.46% java.lang.System.identityHashCode (42 samples)
    • 5.08% java.lang.Object.hashCode (33 samples)
    • 4.00% java.util.ArrayList.indexOf (26 samples)
    • 3.23% com.codename1.tools.translator.IteratorEscape.ctorOnlyStoresParamsIntoThis (21 samples)
    • 3.08% com.codename1.tools.translator.IteratorEscape.mangle (20 samples)
    • 2.46% com.codename1.tools.translator.DeadFieldElimination.run (16 samples)
    • 2.31% com.codename1.tools.translator.BytecodeMethod.updateInlinableFieldDependencies (15 samples)
    • 2.31% java.lang.StringBuilder.append (15 samples)
    • 1.85% com.codename1.tools.translator.JavascriptReachability.enqueueResolved (12 samples)
    • 1.69% com.codename1.tools.translator.Parser.cullMethods (11 samples)
    • 1.69% java.util.AbstractCollection.containsAll (11 samples)
    • 1.54% com.codename1.tools.translator.bytecodes.Invoke.resolveDirectTarget (10 samples)
    • 1.54% java.util.TreeMap.getEntry (10 samples)
    • 1.38% java.lang.String.equals (9 samples)
    • 1.38% java.io.FileOutputStream.writeBytes (9 samples)
    • 1.38% java.util.HashMap.hash (9 samples)
    • 1.23% java.io.FileOutputStream.open0 (8 samples)
    • 1.23% com.codename1.tools.translator.BytecodeMethod.optimize (8 samples)
    • 1.23% com.codename1.tools.translator.Parser.writeOutput (8 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 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

Benchmark Results

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

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 59ms / native 2ms = 29.5x 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 80.000 ms
Base64 CN1 decode 55.000 ms
Base64 native encode 685.000 ms
Base64 encode ratio (CN1/native) 0.117x (88.3% faster)
Base64 native decode 299.000 ms
Base64 decode ratio (CN1/native) 0.184x (81.6% faster)
Base64 SIMD encode 58.000 ms
Base64 encode ratio (SIMD/CN1) 0.725x (27.5% faster)
Base64 SIMD decode 46.000 ms
Base64 decode ratio (SIMD/CN1) 0.836x (16.4% faster)
Base64 encode ratio (SIMD/native) 0.085x (91.5% faster)
Base64 decode ratio (SIMD/native) 0.154x (84.6% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 14.000 ms
Image createMask (SIMD on) 4.000 ms
Image createMask ratio (SIMD on/off) 0.286x (71.4% faster)
Image applyMask (SIMD off) 58.000 ms
Image applyMask (SIMD on) 101.000 ms
Image applyMask ratio (SIMD on/off) 1.741x (74.1% slower)
Image modifyAlpha (SIMD off) 48.000 ms
Image modifyAlpha (SIMD on) 28.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.583x (41.7% faster)
Image modifyAlpha removeColor (SIMD off) 46.000 ms
Image modifyAlpha removeColor (SIMD on) 49.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 1.065x (6.5% slower)

@shai-almog

shai-almog commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

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.

RFE: Backend transaction synchronization, scoped resources, and isolation selection

1 participant