Skip to content

Add streaming ZIP downloads and shared java.util.zip support - #6006

Merged
shai-almog merged 17 commits into
masterfrom
parparvm-streaming-zip-api
Oct 12, 2026
Merged

shai-almog merged 17 commits into
masterfrom
parparvm-streaming-zip-api

Conversation

@shai-almog

@shai-almog shai-almog commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #5998.

Adds streaming ZIP generation with Unix file metadata to the backend and exposes the shared java.util.zip streaming API to ParparVM and mobile builds. A backend can return HttpServer.Response.stream(...), open its sources inside the writer callback, and write a project archive directly to the client without an archive-sized byte array or temporary file.

ZipArchiveOutputStream accepts standard ZipEntry objects and an optional Unix permission mode. It writes executable launchers, explicit directories, Unicode names, empty files, timestamps, comments, and compression settings. Duplicate names and lossy name/comment encodings are rejected. ZIP64 is explicitly refused; entry/archive sizes, entry counts, and retained central-directory metadata have documented limits. Fixed metadata and ordering produce equivalent contents and metadata across JVM and native builds.

HTTP/1.1 uses chunked responses, HTTP/1.0 closes after the response, and native HTTP/2 uses a bounded chunk provider with flow control. Disconnects, stream resets, and socket timeouts interrupt output writes so try-with-resources closes sources. HEAD and bodyless statuses never invoke the writer. An HTTP/2 reset cancels only its producer and leaves the connection usable. The callback occupies its serving worker while running; cancellation is observed on output I/O. The runnable download example and compiled guide snippets document ownership and these limits.

The runtime includes ZIP/GZIP streams, Deflater/Inflater, checksums, checked streams, and ZIP entries/exceptions. It reuses the existing JZlib engine through reproducible source generation. This covers the issue's acceptance criteria; random-access ZipFile, reverse compression filters, and FileTime overloads are outside this streaming API.

Validation:

  • ZIP interoperability/regressions on the JDK, patched ParparVM Java API, and translated native runtime, including dictionary retries, tiny-buffer flushing, trailing GZIP data, strict encoding, and timestamp replacement.
  • Real socket tests: a 64 MiB download under a 32 MiB JVM heap; cancellation before consuming a 1 GiB source; HEAD/204, failure framing, and HTTP/1.0 ownership.
  • macOS native HTTP/1 and HTTP/2, with cleartext and verified TLS; flow-control pauses, RST_STREAM cleanup, and connection reuse.
  • Locally packaged Linux glibc arm64: the same socket tests; archive contents and metadata match JVM/macOS, and standard unzip preserves executable launchers.
  • Existing backend suite: 911 tests, zero failures/errors, 75 skips. Core gzip regressions, mobile API compilation, Javadocs, guide snippets, copyright/package checks, generated-source checks, and the core/backend quality gate pass locally.

The security findings are fixed in the canonical compression sources and regenerated runtime. Third-party BSD notices are retained. All native packaging validation was local; no GraalVM/native-image CI workflow or label was added or invoked.

The PR also carries two scoped Linux x64 translator timing calibrations for the expanded API corpus. They record both five-round CI measurements and before/after controls in vm/selfhost/perf-baseline/pr/6006.json; RAM baselines and the existing 20% timing tolerance are unchanged. The baseline validator, 76 performance-gate tests, and replay of both failing CI result sets pass. The separate FFmpeg dependency download failure passed on rerun without dependency changes.

@shai-almog

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 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-12T10:33:35.112578Z 471e51c 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.

Comment thread vm/JavaAPI/src/com/codename1/impl/zip/Deflate.java Fixed
Comment thread vm/JavaAPI/src/com/codename1/impl/zip/Deflate.java Fixed
Comment thread vm/JavaAPI/src/com/codename1/impl/zip/Tree.java Fixed
Comment thread vm/JavaAPI/src/com/codename1/impl/zip/Tree.java Fixed

@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: bb0dba8ab4

ℹ️ 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/JavaAPI/src/java/util/zip/GZIPInputStream.java Outdated
Comment thread CodenameOne/src/com/codename1/io/zip/ZipArchiveOutputStream.java Outdated
Comment thread vm/JavaAPI/src/java/util/zip/DeflaterOutputStream.java Outdated
Comment thread CodenameOne/src/com/codename1/io/zip/ZipArchiveOutputStream.java Outdated
Comment thread vm/JavaAPI/src/com/codename1/impl/zip/Inflate.java
@github-actions

github-actions Bot commented Oct 11, 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 11, 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% (122148/850229), branch 9.91% (8466/85441), complexity 7.81% (6525/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% (122148/850229), branch 9.91% (8466/85441), complexity 7.81% (6525/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 180ms / native 158ms = 1.1x speedup
SIMD float-mul (64K x300) java 141ms / native 146ms = 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 87.000 ms
Base64 CN1 decode 84.000 ms
Base64 native encode 413.000 ms
Base64 encode ratio (CN1/native) 0.211x (78.9% faster)
Base64 native decode 265.000 ms
Base64 decode ratio (CN1/native) 0.317x (68.3% faster)
Image encode benchmark status skipped (SIMD unsupported)

@shai-almog shai-almog changed the title Add shared streaming java.util.zip support to ParparVM Add streaming ZIP downloads and shared java.util.zip support Oct 11, 2026
@github-actions

github-actions Bot commented Oct 11, 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 11, 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 6ms = 9.3x speedup
SIMD float-mul (64K x300) java 59ms / native 4ms = 14.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 74.000 ms
Base64 CN1 decode 89.000 ms
Base64 SIMD encode 112.000 ms
Base64 encode ratio (SIMD/CN1) 1.514x (51.4% 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) 19.000 ms
Image applyMask (SIMD on) 22.000 ms
Image applyMask ratio (SIMD on/off) 1.158x (15.8% slower)
Image modifyAlpha (SIMD off) 26.000 ms
Image modifyAlpha (SIMD on) 17.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.654x (34.6% faster)
Image modifyAlpha removeColor (SIMD off) 29.000 ms
Image modifyAlpha removeColor (SIMD on) 19.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.655x (34.5% faster)

@github-actions

Copy link
Copy Markdown
Contributor

Cloudflare Preview

@shai-almog

shai-almog commented Oct 11, 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 57ms / native 4ms = 14.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 96.000 ms
Base64 CN1 decode 98.000 ms
Base64 SIMD encode 125.000 ms
Base64 encode ratio (SIMD/CN1) 1.302x (30.2% slower)
Base64 SIMD decode 99.000 ms
Base64 decode ratio (SIMD/CN1) 1.010x (1.0% slower)
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) 24.000 ms
Image applyMask (SIMD on) 37.000 ms
Image applyMask ratio (SIMD on/off) 1.542x (54.2% slower)
Image modifyAlpha (SIMD off) 53.000 ms
Image modifyAlpha (SIMD on) 24.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.453x (54.7% faster)
Image modifyAlpha removeColor (SIMD off) 40.000 ms
Image modifyAlpha removeColor (SIMD on) 32.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.800x (20.0% 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.34x (base 1.22x, +9.7%) 0.86x (base 0.94x, -8.5%) ok
translator (self) 4 0.55x (base 0.60x, -9.0%) 0.58x (base 0.54x, +7.1%) ok
intArithmetic 4 1.16x (base 1.10x, +5.1%) 0.06x (base 0.06x, +4.9%) ok
longArithmetic 4 1.08x (base 1.08x, -0.1%) 0.05x (base 0.05x, +1.1%) ok
mathTranscendental 4 0.78x (base 0.79x, -1.7%) 0.06x (base 0.06x, +0.4%) ok
arraySequential 4 1.36x (base 1.36x, -0.6%) 0.39x (base 0.39x, +0.3%) ok
arrayRandom 4 1.07x (base 1.06x, +1.0%) 0.23x (base 0.23x, -0.0%) ok
objectAllocation 4 1.56x (base 1.56x, -0.2%) 0.30x (base 0.39x, -21.3%) ok
valueEscape 4 0.10x (base 0.10x, +0.4%) 0.04x (base 0.04x, -1.2%) ok
hashMapChurn 4 1.76x (base 1.80x, -2.2%) 0.10x (base 0.09x, +2.6%) ok
stringBuilding 4 1.30x (base 1.22x, +6.7%) 0.27x (base 0.32x, -17.1%) ok
recursion 4 1.38x (base 1.49x, -7.5%) 0.06x (base 0.06x, -0.9%) ok
quicksort 4 1.10x (base 1.13x, -3.3%) 0.12x (base 0.12x, -0.1%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

@shai-almog

shai-almog commented Oct 11, 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: AMD EPYC 7763 64-Core Processor (baseline linux-x64@amd-epyc-7763-64-core-processor)

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.77x (base 0.85x, -8.8%) 1.05x (base 1.02x, +2.7%) ok
translator (self) 4 0.55x (base 0.63x, -12.7%) 0.50x (base 0.52x, -3.2%) ok
intArithmetic 4 1.10x (base 1.12x, -1.2%) 0.06x (base 0.06x, -0.8%) ok
longArithmetic 4 1.14x (base 1.08x, +5.2%) 0.05x (base 0.05x, +0.1%) ok
mathTranscendental 4 1.08x (base 1.08x, +0.1%) 0.07x (base 0.07x, -0.4%) ok
arraySequential 4 2.35x (base 2.00x, +17.0%) 0.38x (base 0.36x, +4.8%) ok
arrayRandom 4 1.06x (base 0.91x, +16.1%) 0.23x (base 0.21x, +9.1%) ok
objectAllocation 4 1.71x (base 1.65x, +3.6%) 0.32x (base 0.37x, -12.4%) ok
valueEscape 4 0.10x (base 0.10x, -0.4%) 0.04x (base 0.04x, +1.3%) ok
hashMapChurn 4 1.43x (base 1.48x, -3.3%) 0.10x (base 0.09x, +7.7%) ok
stringBuilding 4 1.41x (base 1.39x, +1.7%) 0.26x (base 0.26x, +2.3%) ok
recursion 4 1.19x (base 1.25x, -5.3%) 0.06x (base 0.08x, -25.4%) ok
quicksort 4 1.11x (base 1.07x, +3.4%) 0.13x (base 0.11x, +14.4%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 11, 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.5%) 0.95x (base 0.87x, +9.4%) ok
translator (self) 4 0.74x (base 0.70x, +5.7%) 0.46x (base 0.45x, +2.2%) ok
intArithmetic 4 1.04x (base 1.04x, -0.0%) 0.03x (base 0.03x, -0.9%) ok
longArithmetic 4 0.79x (base 0.79x, +0.0%) 0.03x (base 0.03x, -1.4%) ok
mathTranscendental 4 1.10x (base 1.10x, -0.0%) 0.03x (base 0.03x, +1.5%) ok
arraySequential 4 0.41x (base 0.36x, +13.2%) 0.37x (base 0.37x, +0.1%) ok
arrayRandom 4 0.94x (base 0.94x, -0.2%) 0.20x (base 0.20x, -0.5%) ok
objectAllocation 4 1.97x (base 1.77x, +11.6%) 0.36x (base 0.38x, -3.5%) ok
valueEscape 4 0.51x (base 0.51x, -0.1%) 0.03x (base 0.03x, -1.4%) ok
hashMapChurn 4 0.85x (base 0.84x, +1.0%) 0.12x (base 0.12x, +3.1%) ok
stringBuilding 4 1.47x (base 1.36x, +8.0%) 0.26x (base 0.26x, +0.5%) ok
recursion 4 1.56x (base 1.43x, +8.5%) 0.03x (base 0.04x, -1.8%) ok
quicksort 4 1.01x (base 0.99x, +1.4%) 0.09x (base 0.09x, +0.6%) ok

Result: no regression

@shai-almog

shai-almog commented Oct 11, 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 49ms / native 2ms = 24.5x speedup
SIMD float-mul (64K x300) java 48ms / native 3ms = 16.0x speedup
SIMD kernel correctness PASS (native result == scalar reference)
Base64 native bridge unavailable (CN1 + SIMD + image benchmarks only)
Base64 payload size 8192 bytes
Base64 benchmark iterations 6000
Base64 SIMD byte path gated to scalar (CPU autovectorizes scalar; explicit SIMD not beneficial here)
Base64 CN1 encode 60.000 ms
Base64 CN1 decode 73.000 ms
Base64 SIMD encode 73.000 ms
Base64 encode ratio (SIMD/CN1) 1.217x (21.7% 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) 18.000 ms
Image applyMask ratio (SIMD on/off) 0.947x (5.3% faster)
Image modifyAlpha (SIMD off) 16.000 ms
Image modifyAlpha (SIMD on) 11.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.688x (31.3% faster)
Image modifyAlpha removeColor (SIMD off) 20.000 ms
Image modifyAlpha removeColor (SIMD on) 12.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.600x (40.0% 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.12x (base 1.11x, +1.3%) 0.97x (base 0.97x, -0.7%) ok
translator (self) 4 0.84x (base 0.84x, +0.5%) 0.48x (base 0.45x, +5.5%) 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.4%) 0.06x (base 0.06x, +1.8%) ok
mathTranscendental 4 0.73x (base 0.72x, +1.5%) 0.06x (base 0.06x, +0.4%) ok
arraySequential 4 0.37x (base 0.46x, -18.0%) 0.39x (base 0.39x, +0.0%) ok
arrayRandom 4 0.93x (base 0.94x, -0.3%) 0.23x (base 0.23x, +0.0%) ok
objectAllocation 4 1.77x (base 2.81x, -36.9%) 0.32x (base 0.43x, -26.5%) ok
valueEscape 4 0.76x (base 0.76x, +0.1%) 0.05x (base 0.05x, +0.5%) ok
hashMapChurn 4 1.00x (base 0.98x, +2.0%) 0.11x (base 0.12x, -9.1%) ok
stringBuilding 4 1.53x (base 1.43x, +7.3%) 0.27x (base 0.27x, -0.3%) ok
recursion 4 1.47x (base 1.46x, +0.3%) 0.06x (base 0.07x, -0.5%) ok
quicksort 4 1.01x (base 1.00x, +1.2%) 0.12x (base 0.12x, -0.1%) ok

Result: no regression

@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

✅ ByteCodeTranslator Quality Report

Test & Coverage

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

Benchmark Results

  • Execution Time: 5958 ms

  • Hotspots (Top 20 sampled methods):

    • 7.78% com.codename1.tools.translator.IteratorEscape.mangle (69 samples)
    • 6.09% com.codename1.tools.translator.BytecodeMethod.equals (54 samples)
    • 5.41% java.lang.System.identityHashCode (48 samples)
    • 4.96% java.lang.Object.hashCode (44 samples)
    • 4.40% java.util.ArrayList.indexOf (39 samples)
    • 3.27% java.util.AbstractCollection.containsAll (29 samples)
    • 2.82% java.lang.StringBuilder.append (25 samples)
    • 2.71% com.codename1.tools.translator.BytecodeMethod.updateInlinableFieldDependencies (24 samples)
    • 2.37% com.codename1.tools.translator.bytecodes.Invoke.findMethodUp (21 samples)
    • 2.14% java.io.FileOutputStream.writeBytes (19 samples)
    • 1.92% com.codename1.tools.translator.classfile.analysis.Frame.execute (17 samples)
    • 1.92% java.util.HashMap.hash (17 samples)
    • 1.80% com.codename1.tools.translator.Parser.cullMethods (16 samples)
    • 1.69% com.codename1.tools.translator.JavascriptReachability.enqueueResolved (15 samples)
    • 1.58% com.codename1.tools.translator.DeadFieldElimination.run (14 samples)
    • 1.47% com.codename1.tools.translator.IteratorEscape.ctorOnlyStoresParamsIntoThis (13 samples)
    • 1.47% java.lang.String.equals (13 samples)
    • 1.35% com.codename1.tools.translator.Parser.writeOutput (12 samples)
    • 1.35% com.codename1.tools.translator.ByteCodeClass.hasDeclaredMethod (12 samples)
    • 1.24% com.codename1.tools.translator.BytecodeMethod.addToConstantPool (11 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 168 screenshots: 168 matched.
✅ Native iOS Metal screenshot tests passed.

Benchmark Results

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

Build and Run Timing

Metric Duration
Simulator Boot 2000 ms
Simulator Boot (Run) 1000 ms
App Install 14000 ms
App Launch 11000 ms
Test Execution 481000 ms

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 293ms / native 5ms = 58.6x speedup
SIMD float-mul (64K x300) java 345ms / native 7ms = 49.2x 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 84.000 ms
Base64 CN1 decode 62.000 ms
Base64 native encode 1504.000 ms
Base64 encode ratio (CN1/native) 0.056x (94.4% faster)
Base64 native decode 449.000 ms
Base64 decode ratio (CN1/native) 0.138x (86.2% faster)
Base64 SIMD encode 60.000 ms
Base64 encode ratio (SIMD/CN1) 0.714x (28.6% faster)
Base64 SIMD decode 65.000 ms
Base64 decode ratio (SIMD/CN1) 1.048x (4.8% slower)
Base64 encode ratio (SIMD/native) 0.040x (96.0% faster)
Base64 decode ratio (SIMD/native) 0.145x (85.5% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 6.000 ms
Image createMask (SIMD on) 3.000 ms
Image createMask ratio (SIMD on/off) 0.500x (50.0% faster)
Image applyMask (SIMD off) 48.000 ms
Image applyMask (SIMD on) 40.000 ms
Image applyMask ratio (SIMD on/off) 0.833x (16.7% faster)
Image modifyAlpha (SIMD off) 29.000 ms
Image modifyAlpha (SIMD on) 25.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.862x (13.8% faster)
Image modifyAlpha removeColor (SIMD off) 61.000 ms
Image modifyAlpha removeColor (SIMD on) 51.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.836x (16.4% faster)

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

Detailed Performance Metrics

Metric Duration
SIMD kernel backend SSE2 (x64) / NEON (arm64) native kernels
SIMD int-add (64K x300) java 87ms / native 11ms = 7.9x speedup
SIMD float-mul (64K x300) java 48ms / native 2ms = 24.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 61.000 ms
Base64 CN1 decode 50.000 ms
Base64 native encode 569.000 ms
Base64 encode ratio (CN1/native) 0.107x (89.3% faster)
Base64 native decode 263.000 ms
Base64 decode ratio (CN1/native) 0.190x (81.0% faster)
Base64 SIMD encode 48.000 ms
Base64 encode ratio (SIMD/CN1) 0.787x (21.3% faster)
Base64 SIMD decode 43.000 ms
Base64 decode ratio (SIMD/CN1) 0.860x (14.0% faster)
Base64 encode ratio (SIMD/native) 0.084x (91.6% faster)
Base64 decode ratio (SIMD/native) 0.163x (83.7% faster)
Image encode benchmark iterations 100
Image createMask (SIMD off) 5.000 ms
Image createMask (SIMD on) 3.000 ms
Image createMask ratio (SIMD on/off) 0.600x (40.0% faster)
Image applyMask (SIMD off) 64.000 ms
Image applyMask (SIMD on) 45.000 ms
Image applyMask ratio (SIMD on/off) 0.703x (29.7% faster)
Image modifyAlpha (SIMD off) 48.000 ms
Image modifyAlpha (SIMD on) 36.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.750x (25.0% faster)
Image modifyAlpha removeColor (SIMD off) 53.000 ms
Image modifyAlpha removeColor (SIMD on) 37.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.698x (30.2% faster)

@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: 14460aeb2e

ℹ️ 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/JavaAPI/src/java/util/zip/ZipInputStream.java Outdated
Comment thread vm/JavaAPI/src/java/util/zip/CheckedOutputStream.java
Comment thread vm/JavaAPI/src/java/util/zip/Deflater.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: 7f3d9d202b

ℹ️ 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/HttpServer.java
Comment thread vm/JavaAPI/src/java/util/zip/CheckedOutputStream.java
Comment thread CodenameOne/src/com/codename1/io/zip/ZipArchiveOutputStream.java Outdated
Comment thread vm/JavaAPI/src/java/util/zip/ZipInputStream.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: 53933f164e

ℹ️ 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/JavaAPI/src/java/util/zip/GZIPInputStream.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: 85b827f8dc

ℹ️ 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/JavaAPI/src/java/util/zip/GZIPInputStream.java Outdated
Comment thread vm/JavaAPI/src/java/util/zip/InflaterInputStream.java Outdated
Comment thread vm/JavaAPI/src/java/util/zip/CRC32.java Outdated
Comment thread vm/JavaAPI/src/java/util/zip/ZipInputStream.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: b6e5c2b953

ℹ️ 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/JavaAPI/src/java/util/zip/GZIPInputStream.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: 4fbe703e97

ℹ️ 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/JavaAPI/src/java/util/zip/DeflaterOutputStream.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: acea8137e3

ℹ️ 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/io/zip/ZipArchiveOutputStream.java Outdated
Comment thread vm/JavaAPI/src/java/util/zip/Deflater.java
@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. Can't wait for the next one!

Reviewed commit: 471e51c3a3

ℹ️ 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 merged commit 5eddb95 into master Oct 12, 2026
56 of 63 checks passed
@shai-almog
shai-almog deleted the parparvm-streaming-zip-api branch October 12, 2026 17:16
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 streaming ZIP generation with Unix file metadata

2 participants