Skip to content

Design Import: turn Figma, Sketch, PSD, SVG and HTML designs into forms - #6355

Merged
shai-almog merged 41 commits into
masterfrom
design-import-tool
Dec 1, 2026
Merged

shai-almog merged 41 commits into
masterfrom
design-import-tool

Conversation

@shai-almog

Copy link
Copy Markdown
Collaborator

Design Import: turn a design into a Codename One form

A new tool that reads a Figma link or file, Sketch, PSD, SVG or a React/HTML prototype and writes a Form (a generated base class plus a subclass you own), a stylesheet and a unit test.

  • Engine maven/design-import: scope, classify, structure, layout, responsive, style and emit stages, with every guess and CSS compromise recorded as an issue. Pure Java on core, tested headless.
  • Wizard and workbench scripts/designimport: four steps (design, screens, review, write), with the design and the live form side by side, size switching, interact mode, the generated code per element, and a coach-mark tour on every step.
  • Entry points: mvn cn1:import-design and ./gradlew importDesign (window or headless; a Figma link works headless with FIGMA_TOKEN), a CLI, and MCP tools (designimport_*) so an LLM can drive the import.
  • Figma links read through the REST API with a personal access token, which is never saved or logged. Each file read is kept on disk, and that copy opens when Figma rate-limits the token. On the Starter plan a few reads can lock a token out for days.
  • Core: the art readers keep auto layout and constraint metadata, FigmaClient reports Retry-After, CoachMarks fixes, and a JavaSE port buffer fix.
  • Docs: a new developer guide chapter, Design-Import.asciidoc, with screenshots taken from the running tool.
  • Gates: design-import is in the SpotBugs zero-findings lists, and designimport.yml runs it nightly and on PRs that touch its inputs.

Before this PR, the branch went through two adversarial review rounds; every confirmed finding was fixed. Locally, SpotBugs and PMD report 0 for core-unittests and design-import, and the design-import, Maven plugin and Gradle plugin tests pass.

Screenshots show the Laza E-commerce UI Kit (Figma Community, CC BY 4.0).

🤖 Generated with Claude Code

shai-almog and others added 30 commits November 27, 2026 09:04
…ip proof

Adds scripts/designimport, a Codename One app whose engine turns a PSD,
Sketch, Figma or SVG document into a Form, theme.css and a unit test:
scope, detect, structure, classify, layout, responsive, style and emit
stages, with issues and TODOs recorded per stage, a live preview and a
fidelity score (SSIM plus component-box overlap).

RoundTripTest builds the twelve GUI Builder demo forms with a known
theme, exports them to SVG with every layer renamed generically, and
re-imports them: 71 of 74 components come back with the right role.

Core: art nodes keep layout attributes through copies and the native
format; Sketch outline masks with no fill no longer hide their content.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every round-trip form, every docs Sketch file and a design of hostile
layer names (keywords, digits, duplicates, comment terminators, quotes,
backslashes, non-ASCII) now has its generated Form, Base and test
classes compiled with javac and checked for ASCII.

The docs Sketch files are the held-out set: collapsing single-child
wrappers lowered every one of them, so only groups nobody named are
collapsed now, and SmokeTest holds their scores to a floor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DesignImportService exposes open, frames, options, run, tree, issues,
set, resolve, preview, score and emit as JSON-ready operations; the
designimport_* MCP tools, the CLI (one-shot, --script, --mcp-stdio) and
ServiceTest all drive the same code. emit adds the form stylesheet to
theme.css through @import, since a project build compiles only
theme.css, and never overwrites the user's subclass.

design-import.sh --mcp-smoke runs a real JSON-RPC session and fails on
anything but protocol output on stdout.

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

ExamplesTest writes examples/: the twelve demo forms through SVG, three
through PSD, a phone/tablet pair and a screen inside a device mockup,
each with before/after renders, the generated sources and its issues.

Fixes found on the way: frames without layer ids (every SVG and
hand-built document) resolved to the whole document; tablets were
classed as phones by aspect alone; a design that is only pictures now
raises a "flattened" warning instead of scoring well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Layers, the design and the live form side by side, an inspector that
overrides role, layout and UIID, the issue checklist grouped by stage,
a phone/tablet/width switcher and an onion skin of the design over the
form. Every action goes through DesignImportService, the operations
the MCP tools expose. Dark desktop theme in theme.css.

WorkbenchTest drives it headlessly against the app's compiled theme and
renders examples/workbench.png.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
designimport.yml runs the tests, regenerates the gallery as an
artifact and runs the MCP smoke session; on a pull request only when
the tool, its inputs (demo forms, guide Sketch files) or the core
readers change, and nightly otherwise. ExamplesTest re-imports the
twelve SVG round trips only when it writes the gallery, since
RoundTripTest already scores them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The app theme carries the standard header; the generated example
gallery is skipped by the header gate, since it is the tool's output
and is rewritten on every regeneration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GeneratedCompiles now loads what it compiled and runs the emitted test
against the emitted form on the EDT with the emitted stylesheet, for
every round trip, docs file and hostile-name design; until now they
were only compiled. The workbench screenshot shows the file name, not
the machine's directory. The chapter says what the generated test
checks; the workflow drops two general core paths, per the nightly
policy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
createBufferedImage never makes a buffer below 20x20, but
updateBufferSize compared the buffer with the raw canvas size. A canvas
that was never shown is 0x0 (headless runs, unit tests, command line
tools), so every call replaced the buffer, dropped the Graphics2D, and
getGraphics2D slept 10ms to make a new one -- once for each stringWidth
and font height. Design Import's suite went from 8 minutes to 13
seconds; one import from 13s of rendering to 0.3s.

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

The engine and its command line move into the reactor module maven/design-import
(codenameone-design-import). Neither build plugin depends on it: cn1:import-design
resolves it at the plugin's own version and forks it, and the Gradle importDesign task
does the same through a cn1DesignImport configuration, so a project that never imports
a design never downloads it. The CLI's new --project mode prints each pipeline stage on
standard error as it finishes, and both plugins pass those lines through as progress;
a whole import takes one to two seconds, most of it JVM start.

The module joins the SpotBugs gate at zero. gradle-app-test.sh and designimport.yml
run an import in a generated application and build what it wrote.

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

`mvn cn1:import-design` and `./gradlew importDesign` with no design named (or with
cn1.design.gui=true) open a wizard: choose the design, choose the screen in it (or let
the import pair a phone frame with its tablet twin), review in the workbench, and write
the form into the project. The window, its launcher and its stylesheet move into the
codenameone-design-import jar so the build tools can run them; the scripts app is now a
shell around them. Closing the window early exits with its own status, which the build
reports as "nothing was imported" rather than a failure.

Bugs the wizard turned up, fixed here:
- SvgReader ignored data-name, so every layer name written by SvgWriter or Illustrator
  was lost.
- A multi-frame SVG imported as one frame: the <svg> wrapper group is now recognised as
  holding screens when it draws nothing itself and its children are non-overlapping
  screen-sized groups.
- With names back, a text layer named after its own text ("Inner box button") was
  classified by that name; such a name is no longer read as a role hint. Layout overlap
  rose on 10 of the 12 SVG round-trip examples.
- The headless --frame always imported the chosen frame as a phone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The wizard's screen step is a grid of every screen in the design, all chosen to
begin with; each becomes a form of its own (a phone and a tablet frame of one
screen stay one adaptive form), named after its screen and written in one pass.
Choosing a screen no longer re-runs the import, which is what made the old
toggles flicker and drop the selection.

The review step shows the design and the form side by side, each scaled to its
pane, with the selected element outlined on both. A click on either picture
selects the element under it. Issues carry the bounds of their element, and a
guide walks them one at a time, warnings first, outlining each. A tour of the
panes plays the first time. A-/A+ scale every text in the tool and are
remembered. The theme is restyled: cards, chips, segmented controls.

UI kit mockups: the phone's home indicator is chrome and left out, overlapping
shapes with no text are one picture, and a tab bar wrapped in its own backdrop
adopts it.

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

Issue rows wrap and carry the whole text as a tooltip; clicking one brings
it into the guide. The guide offers alternatives under "Or try" (another
component kind, a picture, exact positions, keep chrome, leave it out).
The form pane renders at a real phone or tablet size. Name hints match
whole words only, so "Credits" is no longer a text field via "edit".
Going Back no longer re-adds components that are already on a page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A symbol instance whose size differs from its master was drawn as the
master scaled to fit, which stretched every chat bubble's text. The
master is now copied, the overrides are applied to the copy (a swapped
nested symbol takes its slot's frame; a nested override reaches only
the instance its path names) and each layer is placed by its resizing
constraint. A text that fits its content and got a longer string pushes
the layers to its right, as Sketch does. A detached symbol's override
that names no layer applies to the master's only text.

The options op refuses a variant that is not {scope, kind}. A passed
wizard step is a button back to it. The tool's theme turns on the
desktop scrollbars core already has (track click pages, thumb drags).

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

The pipeline:
- A layer that dims the screen and holds a smaller panel becomes a popup that a tap outside
  closes; one at the bottom edge becomes a bottom sheet.
- A screen drawn taller than a device scrolls between its title bar and tab bar. A lone
  full-screen wrapper group is hoisted so both bars are found. A strip that runs past the
  edge scrolls sideways.
- A rectangular mask keeps its layers when it cuts none of them, instead of turning the
  whole screen into one picture. Boolean shapes rasterize.
- Layers are ordered by paint order.
- Captions keep 30% headroom inside their box, so a wider device font does not truncate
  them. Check box captions follow their box.
- Field hints take the design's colour, font and inset.
- A labelled field symbol is a group holding the field.
- Full-width layers stretch, and a fixed item in the middle of a bar stays centred.

The workbench:
- A screen chip strip replaces the screen combo.
- The size bar is two rows, so nothing overlaps in a narrow pane.
- A Code card shows the Java and CSS behind the selection, with the whole files a click
  away.
- A Resizing card holds stretch, scroll, max width and breakpoints.
- Thumbnails are supersampled.
- Combo and popup styles are consistent.
- Examples, scores and screenshots are regenerated, and the docs cover the live preview,
  the cards, popups and long screens.

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It read only the path field, so with the field empty a press did nothing.

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

- scripts/designimport starts the four-step wizard again; the bare workbench is behind
  -Ddesignimport.workbench=true.
- A selection dims what is around it instead of tinting it pink, in the design and the
  form alike, so its detail stays readable.
- Picking a row in All issues no longer scrolls the column away from it; the list sits
  under the guide, and the Code and Resizing cards open on request.
- A pill hugging its text keeps the design's inset and centres the text vertically; only a
  wide bar's inset is trimmed to its title's headroom ("20 C" was squeezed).

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

- The review step's screen chips are a drop-down again, between previous and
  next, so the bar stays one line however many screens there are.
- Inside the wizard the workbench reports into the wizard's status line; the
  second bottom row is gone.
- ConversionRankTest converts every frame of the given designs, scores each
  against the design's render and writes a worst-first report with the worst
  frames side by side (-Ddesignimport.rank=files).
- Layers named dialog/popup/sheet/modal are popups; the layer list says so.
- A price and a wide button make a row whose button takes the rest; a caption
  nudged off centre stays centred; text across most of the screen wraps.
- Stacked fills are exported as one image, and an image background drops the
  border that painted over it; strips wider than the screen scroll.

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

- The code card colours Java and CSS with the code editor's own tokenizer.
- The form's device, size and mode controls sit in one bar above both the
  design and the form, so the two panes start level.
- The screen picker's text is readable and its bar is centred vertically.
- Selecting a layer restyles two rows instead of rebuilding the list, which
  scrolled it back to the top.
- Layers named radio are RadioButtons in one group, drawn as the design's ring
  and dot; the drawn dot picks the selected one.
- A group named "Buttons" holding a button and a link stays a group, and one
  named "icon" with its caption inside is not flattened to a picture.
- A design longer than the device shows at its whole length.

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

- The screen picker and the live view's size, rotation and mode controls move into
  the wizard's top toolbar; the steps move into the bottom bar. Rows are centred
  with valign-by-row, which is what misaligned the picker's arrows.
- The live view's stage scrolls without making the form take its preferred width,
  so long text wraps inside the screen instead of running past its edge.
- A switch is drawn in the design's track and thumb colours, in the preview and in
  the generated code, so both states are visible.
- The write page can be built twice (Back then Next) without reusing attached fields.
- Generated forms arrange for their own width and read images through resource().
- GeneratedCompiles builds the compiled form and holds its pixels to the preview;
  the examples, the docs Sketch files and the wizard's written form go through it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rong, the target folder follows the package

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…bol labels, unreadable text flagged

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…et a Figma token

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed text sizes the bubble

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shai-almog and others added 10 commits November 29, 2026 10:05
…ields, a reading status

Figma's quota on whole-file reads is small; a Starter token was locked out for
four days after a few reads. A fetched file is kept under the app home and
reopened when Figma refuses, and the refusal says how long Figma asks to wait.
A tall box with one grey line at its top left imports as a multi-line field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… branch ending the loop

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Figma link imports headless too

The developer guide chapter gains a section on importing from a Figma link
(getting a token, FIGMA_TOKEN, the rate limit and the saved copy), the step
tours, and screenshots of the real wizard. cn1:import-design and the Gradle
importDesign task passed a Figma link through as a file path and failed; they
now hand it to the tool as written. A multi-line field starts its text and
hint at the top, as the design draws it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… for refusals, Chrome off the EDT

A class or package name from the wizard, the CLI, the plugins or MCP is
refused unless it is a Java name, so it can no longer write outside the
sources. A Figma 403 or 404 no longer opens the saved copy; only the rate
limit or no connection does. An HTML prototype is read in invokeAndBlock so
the wizard keeps painting. A theme that starts with @charset keeps it first.
A Figma key is ASCII, as the client and the cache expect. The chapter names
the run stages and the full options.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generated comments carry the frame and file names as printable ASCII with no
backslash, so a name like C:\users or a non-ASCII one cannot break the build.
Every arrangement sets each component's margin, zeros included, as the live
preview does, so a tablet margin no longer stays behind on the phone layout.
The generated test checks the narrowest arrangement, the one the simulator
shows. An empty package is refused, both names are checked before either is
kept, a refused open keeps the previous session, and the error reads without
the exception class. The wizard stops when its class name is refused. The
workflow no longer cleans away the gallery it uploads, and runs for the
Gradle task and CoachMarks too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cing a workstation's env.sh

tools/env.sh names one machine's JDK paths; on the CI runner it replaced the
container's valid JAVA_HOME and the MCP smoke step failed before starting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rowing on the EDT

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…into, not HOME's

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shai-almog

shai-almog commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 288 screenshots: 288 matched.

Native Android coverage

  • 📊 Line coverage: 28.03% (95860/341985 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 25.64% (426867/1664702), branch 12.59% (20556/163326), complexity 10.92% (17538/160585), method 16.43% (12700/77276), class 29.63% (2625/8860)
    • Lowest covered classes
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2500 lines covered)
      • org.jacoco.agent.rt.internal_29a6edd.asm.org.jacoco.agent.rt.internal_29a6edd.asm.ClassReader – 0.00% (0/1524 lines covered)
      • androidx.compose.runtime.androidx.compose.runtime.LinkComposer – 0.00% (0/1430 lines covered)
      • org.jacoco.agent.rt.internal_29a6edd.asm.org.jacoco.agent.rt.internal_29a6edd.asm.MethodWriter – 0.00% (0/922 lines covered)
      • kotlinx.coroutines.channels.kotlinx.coroutines.channels.BufferedChannel – 0.00% (0/878 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/774 lines covered)
      • com.google.common.cache.com.google.common.cache.LocalCache$Segment – 0.00% (0/772 lines covered)
      • okio.okio.Buffer – 0.00% (0/687 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/628 lines covered)
      • com.codename1.androidcompat.rt.com.codename1.androidcompat.rt.TextXmlPullParser – 0.00% (0/623 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 28.03% (95860/341985 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 25.64% (426867/1664702), branch 12.59% (20556/163326), complexity 10.92% (17538/160585), method 16.43% (12700/77276), class 29.63% (2625/8860)
    • Lowest covered classes
      • kotlin.collections.unsigned.kotlin.collections.unsigned.UArraysKt___UArraysKt – 0.00% (0/2500 lines covered)
      • org.jacoco.agent.rt.internal_29a6edd.asm.org.jacoco.agent.rt.internal_29a6edd.asm.ClassReader – 0.00% (0/1524 lines covered)
      • androidx.compose.runtime.androidx.compose.runtime.LinkComposer – 0.00% (0/1430 lines covered)
      • org.jacoco.agent.rt.internal_29a6edd.asm.org.jacoco.agent.rt.internal_29a6edd.asm.MethodWriter – 0.00% (0/922 lines covered)
      • kotlinx.coroutines.channels.kotlinx.coroutines.channels.BufferedChannel – 0.00% (0/878 lines covered)
      • kotlin.sequences.kotlin.sequences.SequencesKt___SequencesKt – 0.00% (0/774 lines covered)
      • com.google.common.cache.com.google.common.cache.LocalCache$Segment – 0.00% (0/772 lines covered)
      • okio.okio.Buffer – 0.00% (0/687 lines covered)
      • kotlin.text.kotlin.text.StringsKt___StringsKt – 0.00% (0/628 lines covered)
      • com.codename1.androidcompat.rt.com.codename1.androidcompat.rt.TextXmlPullParser – 0.00% (0/623 lines covered)

Benchmark Results

Detailed Performance Metrics

Metric Duration
SIMD kernel backend scalar fallback (no native SIMD)
SIMD int-add (64K x300) java 104ms / native 97ms = 1.0x speedup
SIMD float-mul (64K x300) java 44ms / native 32ms = 1.3x 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 52.000 ms
Base64 CN1 decode 56.000 ms
Base64 native encode 492.000 ms
Base64 encode ratio (CN1/native) 0.106x (89.4% faster)
Base64 native decode 224.000 ms
Base64 decode ratio (CN1/native) 0.250x (75.0% faster)
Image encode benchmark status skipped (SIMD unsupported)

@shai-almog

shai-almog commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

Native fidelity (Android, Material 3)

54 pairs compared -- median 95.6%, worst 91.3% (FlatButton_pressed_dark), 25th pct 94.9%, mean 95.7%.

Distribution -- >=99%: 2 | 95-99%: 37 | 90-95%: 15 | <90%: 0

Component State Appearance Material Fidelity SSIM mean delta vs base Geometry
FlatButton pressed dark normal 91.3% 0.899 3.10 0.0 ok
Tabs normal light normal 92.3% 0.914 3.05 0.0 ok
Button pressed dark normal 92.6% 0.949 4.32 0.0 ok
FlatButton normal dark normal 93.2% 0.938 2.69 0.0 ok
Button disabled dark normal 93.3% 0.928 2.20 0.0 ok
Button pressed light normal 93.3% 0.952 3.68 0.0 ok
FlatButton normal light normal 93.7% 0.941 2.29 0.0 ok
FlatButton pressed light normal 93.8% 0.942 2.56 0.0 ok
FloatingActionButton pressed light normal 94.4% 0.927 2.82 0.0 OFF (h 0.88)
RadioButton normal dark normal 94.5% 0.963 2.19 0.0 ok
RadioButton normal light normal 94.7% 0.964 1.85 0.0 ok
CheckBox selected dark normal 94.7% 0.950 2.60 0.0 ok
RadioButton selected dark normal 94.8% 0.963 2.42 0.0 ok
CheckBox normal dark normal 94.9% 0.952 2.69 0.0 ok
Button normal dark normal 94.9% 0.949 3.16 0.0 ok
CheckBox normal light normal 95.0% 0.953 2.30 0.0 ok
Toolbar normal dark normal 95.1% 0.906 1.60 0.0 ok
RaisedButton pressed dark normal 95.2% 0.950 2.39 0.0 ok
CheckBox disabled dark normal 95.2% 0.954 1.47 0.0 ok
CheckBox disabled light normal 95.2% 0.956 1.34 0.0 ok
Tabs normal dark normal 95.2% 0.913 3.65 0.0 ok
RadioButton disabled dark normal 95.3% 0.963 1.18 0.0 ok
RadioButton selected light normal 95.3% 0.964 1.84 0.0 ok
CheckBox selected light normal 95.4% 0.952 2.06 0.0 ok
Switch selected light normal 95.4% 0.966 1.59 0.0 ok
Switch selected dark normal 95.5% 0.966 1.86 0.0 ok
RadioButton disabled light normal 95.5% 0.966 1.08 0.0 ok
Switch disabled dark normal 95.6% 0.961 0.85 0.0 ok
Dialog normal light normal 95.7% 0.930 2.30 0.0 ok
RaisedButton pressed light normal 95.8% 0.958 2.16 0.0 ok
Button normal light normal 95.8% 0.953 2.46 0.0 ok
Dialog normal dark normal 95.8% 0.932 2.30 0.0 ok
Switch normal light normal 96.0% 0.961 1.45 0.0 ok
FloatingActionButton normal light normal 96.1% 0.937 1.14 0.0 ok
FloatingActionButton pressed dark normal 96.2% 0.951 2.45 0.0 ok
Switch normal dark normal 96.2% 0.962 1.39 0.0 ok
TextField disabled dark normal 96.2% 0.965 0.76 0.0 ok
RaisedButton normal dark normal 96.4% 0.952 1.78 0.0 ok
Switch disabled light normal 96.4% 0.970 0.61 0.0 ok
Button disabled light normal 96.8% 0.960 1.06 0.0 ok
ProgressBar normal dark normal 96.9% 0.967 2.03 0.0 OFF (h 1.50)
RaisedButton disabled dark normal 97.0% 0.955 0.89 0.0 ok
FloatingActionButton normal dark normal 97.1% 0.952 1.43 0.0 ok
ProgressBar normal light normal 97.3% 0.974 1.53 0.0 OFF (h 1.50)
RaisedButton disabled light normal 97.3% 0.961 0.79 0.0 ok
TextField disabled light normal 97.3% 0.965 0.79 0.0 ok
RaisedButton normal light normal 97.3% 0.961 1.40 0.0 ok
TextField normal dark normal 97.6% 0.958 1.83 0.0 ok
TextField normal light normal 97.6% 0.958 1.63 0.0 ok
Slider normal dark normal 98.4% 0.990 0.87 0.0 ok
Toolbar normal light normal 98.7% 0.974 1.28 0.0 ok
Slider normal light normal 99.0% 0.991 0.47 0.0 ok
Slider disabled dark normal 99.6% 0.993 0.22 0.0 ok
Slider disabled light normal 99.6% 0.993 0.18 0.0 ok
Geometry vs native (bbox offset / size ratio / center offset / corner radius) -- gated separately from the visual score
Component State Appearance bbox dx,dy (px) w ratio h ratio center off (px) radius native->cn1 (px)
FloatingActionButton pressed light +0,+0 0.929 0.881 4.0 -
FloatingActionButton normal light +0,+0 0.946 0.912 2.9 -
Button pressed dark +0,+0 0.947 0.975 2.6 -
Button disabled dark +0,+0 0.947 0.975 2.6 -
Button pressed light +0,+0 0.947 0.975 2.6 -
Button normal dark +0,+0 0.947 0.975 2.6 -
RaisedButton pressed dark +0,+0 0.945 0.975 2.6 -
RaisedButton pressed light +0,+0 0.945 0.975 2.6 -
Button normal light +0,+0 0.947 0.975 2.6 -
RaisedButton normal dark +0,+0 0.945 0.975 2.6 -
Button disabled light +0,+0 0.947 0.975 2.6 -
RaisedButton disabled dark +0,+0 0.945 0.975 2.6 -
RaisedButton disabled light +0,+0 0.945 0.975 2.6 -
RaisedButton normal light +0,+0 0.945 0.975 2.6 -
RadioButton normal dark +1,+1 1.029 1.000 2.2 -
RadioButton normal light +1,+1 1.029 1.000 2.2 -
RadioButton selected dark +1,+1 1.029 1.000 2.2 -
RadioButton disabled dark +1,+1 1.029 1.000 2.2 -
RadioButton selected light +1,+1 1.029 1.000 2.2 -
Switch selected light +0,+0 1.080 1.063 2.2 -
RadioButton disabled light +1,+1 1.029 1.000 2.2 -
CheckBox selected dark +1,+1 1.013 1.000 1.8 -
CheckBox normal dark +1,+1 1.013 1.000 1.8 -
CheckBox normal light +1,+1 1.013 1.000 1.8 -
CheckBox disabled dark +1,+1 1.013 1.000 1.8 -
CheckBox disabled light +1,+1 1.013 1.000 1.8 -
CheckBox selected light +1,+1 1.013 1.000 1.8 -
Switch selected dark +0,+0 1.060 1.031 1.6 -
Switch disabled dark +0,-1 1.060 1.031 1.6 -
Dialog normal light +0,+0 1.007 0.982 1.6 -
Dialog normal dark +0,+0 1.007 0.982 1.6 -
Switch normal light +0,-1 1.060 1.031 1.6 -
Switch normal dark +0,-1 1.060 1.031 1.6 -
Switch disabled light +0,-1 1.060 1.031 1.6 -
FloatingActionButton pressed dark +0,+0 0.963 0.963 1.4 -
FloatingActionButton normal dark +0,+0 0.963 0.963 1.4 -
Toolbar normal light -1,+1 1.000 1.000 1.4 -
FlatButton pressed dark +0,+0 0.977 0.975 1.1 -
FlatButton normal dark +0,+0 0.977 0.975 1.1 -
FlatButton normal light +0,+0 0.977 0.975 1.1 -
FlatButton pressed light +0,+0 0.977 0.975 1.1 -
TextField normal dark +0,+0 1.015 1.036 1.1 -
TextField normal light +0,+0 1.015 1.036 1.1 -
Toolbar normal dark +0,+0 1.000 1.032 1.0 -
ProgressBar normal dark +0,+0 1.000 1.500 1.0 -
ProgressBar normal light +0,+0 1.000 1.500 1.0 -
TextField disabled dark +0,+0 1.015 1.018 0.7 -
TextField disabled light +0,+0 1.015 1.018 0.7 -
Tabs normal light +0,+1 1.000 0.984 0.5 -
Slider normal dark +1,+0 0.996 1.000 0.5 -
Slider normal light +1,+0 0.996 1.000 0.5 -
Tabs normal dark +0,+0 1.000 1.000 0.0 -
Slider disabled dark +0,+0 1.000 1.000 0.0 -
Slider disabled light +0,+0 1.000 1.000 0.0 -

Side-by-side comparisons (worst first)

  • FlatButton_pressed_dark -- 91.25% fidelity (SSIM 0.8985) (no change)

    native FlatButton_pressed_dark cn1 FlatButton_pressed_dark
    Left: native widget. Right: Codename One render.

  • Tabs_normal_light -- 92.28% fidelity (SSIM 0.9140) (no change)

    native Tabs_normal_light cn1 Tabs_normal_light
    Left: native widget. Right: Codename One render.

  • Button_pressed_dark -- 92.61% fidelity (SSIM 0.9485) (no change)

    native Button_pressed_dark cn1 Button_pressed_dark
    Left: native widget. Right: Codename One render.

  • FlatButton_normal_dark -- 93.24% fidelity (SSIM 0.9381) (no change)

    native FlatButton_normal_dark cn1 FlatButton_normal_dark
    Left: native widget. Right: Codename One render.

  • Button_disabled_dark -- 93.26% fidelity (SSIM 0.9278) (no change)

    native Button_disabled_dark cn1 Button_disabled_dark
    Left: native widget. Right: Codename One render.

  • Button_pressed_light -- 93.34% fidelity (SSIM 0.9521) (no change)

    native Button_pressed_light cn1 Button_pressed_light
    Left: native widget. Right: Codename One render.

  • FlatButton_normal_light -- 93.72% fidelity (SSIM 0.9410) (no change)

    native FlatButton_normal_light cn1 FlatButton_normal_light
    Left: native widget. Right: Codename One render.

  • FlatButton_pressed_light -- 93.77% fidelity (SSIM 0.9424) (no change)

    native FlatButton_pressed_light cn1 FlatButton_pressed_light
    Left: native widget. Right: Codename One render.

  • FloatingActionButton_pressed_light -- 94.44% fidelity (SSIM 0.9273) (no change)

    native FloatingActionButton_pressed_light cn1 FloatingActionButton_pressed_light
    Left: native widget. Right: Codename One render.

  • RadioButton_normal_dark -- 94.46% fidelity (SSIM 0.9630) (no change)

    native RadioButton_normal_dark cn1 RadioButton_normal_dark
    Left: native widget. Right: Codename One render.

  • RadioButton_normal_light -- 94.69% fidelity (SSIM 0.9643) (no change)

    native RadioButton_normal_light cn1 RadioButton_normal_light
    Left: native widget. Right: Codename One render.

  • CheckBox_selected_dark -- 94.71% fidelity (SSIM 0.9502) (no change)

    native CheckBox_selected_dark cn1 CheckBox_selected_dark
    Left: native widget. Right: Codename One render.

  • RadioButton_selected_dark -- 94.79% fidelity (SSIM 0.9630) (no change)

    native RadioButton_selected_dark cn1 RadioButton_selected_dark
    Left: native widget. Right: Codename One render.

  • CheckBox_normal_dark -- 94.93% fidelity (SSIM 0.9516) (no change)

    native CheckBox_normal_dark cn1 CheckBox_normal_dark
    Left: native widget. Right: Codename One render.

  • Button_normal_dark -- 94.94% fidelity (SSIM 0.9491) (no change)

    native Button_normal_dark cn1 Button_normal_dark
    Left: native widget. Right: Codename One render.

  • CheckBox_normal_light -- 95.03% fidelity (SSIM 0.9531) (no change)

    native CheckBox_normal_light cn1 CheckBox_normal_light
    Left: native widget. Right: Codename One render.

  • Toolbar_normal_dark -- 95.07% fidelity (SSIM 0.9059) (no change)

    native Toolbar_normal_dark cn1 Toolbar_normal_dark
    Left: native widget. Right: Codename One render.

  • RaisedButton_pressed_dark -- 95.19% fidelity (SSIM 0.9501) (no change)

    native RaisedButton_pressed_dark cn1 RaisedButton_pressed_dark
    Left: native widget. Right: Codename One render.

  • CheckBox_disabled_dark -- 95.20% fidelity (SSIM 0.9538) (no change)

    native CheckBox_disabled_dark cn1 CheckBox_disabled_dark
    Left: native widget. Right: Codename One render.

  • CheckBox_disabled_light -- 95.21% fidelity (SSIM 0.9562) (no change)

    native CheckBox_disabled_light cn1 CheckBox_disabled_light
    Left: native widget. Right: Codename One render.

  • Tabs_normal_dark -- 95.23% fidelity (SSIM 0.9125) (no change)

    native Tabs_normal_dark cn1 Tabs_normal_dark
    Left: native widget. Right: Codename One render.

  • RadioButton_disabled_dark -- 95.29% fidelity (SSIM 0.9630) (no change)

    native RadioButton_disabled_dark cn1 RadioButton_disabled_dark
    Left: native widget. Right: Codename One render.

  • RadioButton_selected_light -- 95.33% fidelity (SSIM 0.9642) (no change)

    native RadioButton_selected_light cn1 RadioButton_selected_light
    Left: native widget. Right: Codename One render.

  • CheckBox_selected_light -- 95.37% fidelity (SSIM 0.9524) (no change)

    native CheckBox_selected_light cn1 CheckBox_selected_light
    Left: native widget. Right: Codename One render.

  • Switch_selected_light -- 95.37% fidelity (SSIM 0.9658) (no change)

    native Switch_selected_light cn1 Switch_selected_light
    Left: native widget. Right: Codename One render.

  • Switch_selected_dark -- 95.45% fidelity (SSIM 0.9656) (no change)

    native Switch_selected_dark cn1 Switch_selected_dark
    Left: native widget. Right: Codename One render.

  • RadioButton_disabled_light -- 95.46% fidelity (SSIM 0.9657) (no change)

    native RadioButton_disabled_light cn1 RadioButton_disabled_light
    Left: native widget. Right: Codename One render.

  • Switch_disabled_dark -- 95.57% fidelity (SSIM 0.9613) (no change)

    native Switch_disabled_dark cn1 Switch_disabled_dark
    Left: native widget. Right: Codename One render.

  • Dialog_normal_light -- 95.65% fidelity (SSIM 0.9300) (no change)

    native Dialog_normal_light cn1 Dialog_normal_light
    Left: native widget. Right: Codename One render.

  • RaisedButton_pressed_light -- 95.78% fidelity (SSIM 0.9578) (no change)

    native RaisedButton_pressed_light cn1 RaisedButton_pressed_light
    Left: native widget. Right: Codename One render.

  • Button_normal_light -- 95.79% fidelity (SSIM 0.9528) (no change)

    native Button_normal_light cn1 Button_normal_light
    Left: native widget. Right: Codename One render.

  • Dialog_normal_dark -- 95.79% fidelity (SSIM 0.9322) (no change)

    native Dialog_normal_dark cn1 Dialog_normal_dark
    Left: native widget. Right: Codename One render.

  • Switch_normal_light -- 95.97% fidelity (SSIM 0.9612) (no change)

    native Switch_normal_light cn1 Switch_normal_light
    Left: native widget. Right: Codename One render.

  • FloatingActionButton_normal_light -- 96.09% fidelity (SSIM 0.9367) (no change)

    native FloatingActionButton_normal_light cn1 FloatingActionButton_normal_light
    Left: native widget. Right: Codename One render.

  • FloatingActionButton_pressed_dark -- 96.16% fidelity (SSIM 0.9513) (no change)

    native FloatingActionButton_pressed_dark cn1 FloatingActionButton_pressed_dark
    Left: native widget. Right: Codename One render.

  • Switch_normal_dark -- 96.17% fidelity (SSIM 0.9616) (no change)

    native Switch_normal_dark cn1 Switch_normal_dark
    Left: native widget. Right: Codename One render.

  • TextField_disabled_dark -- 96.21% fidelity (SSIM 0.9648) (no change)

    native TextField_disabled_dark cn1 TextField_disabled_dark
    Left: native widget. Right: Codename One render.

  • RaisedButton_normal_dark -- 96.41% fidelity (SSIM 0.9516) (no change)

    native RaisedButton_normal_dark cn1 RaisedButton_normal_dark
    Left: native widget. Right: Codename One render.

  • Switch_disabled_light -- 96.43% fidelity (SSIM 0.9698) (no change)

    native Switch_disabled_light cn1 Switch_disabled_light
    Left: native widget. Right: Codename One render.

  • Button_disabled_light -- 96.80% fidelity (SSIM 0.9596) (no change)

    native Button_disabled_light cn1 Button_disabled_light
    Left: native widget. Right: Codename One render.

  • ProgressBar_normal_dark -- 96.91% fidelity (SSIM 0.9669) (no change)

    native ProgressBar_normal_dark cn1 ProgressBar_normal_dark
    Left: native widget. Right: Codename One render.

  • RaisedButton_disabled_dark -- 97.02% fidelity (SSIM 0.9549) (no change)

    native RaisedButton_disabled_dark cn1 RaisedButton_disabled_dark
    Left: native widget. Right: Codename One render.

  • FloatingActionButton_normal_dark -- 97.07% fidelity (SSIM 0.9521) (no change)

    native FloatingActionButton_normal_dark cn1 FloatingActionButton_normal_dark
    Left: native widget. Right: Codename One render.

  • ProgressBar_normal_light -- 97.26% fidelity (SSIM 0.9739) (no change)

    native ProgressBar_normal_light cn1 ProgressBar_normal_light
    Left: native widget. Right: Codename One render.

  • RaisedButton_disabled_light -- 97.26% fidelity (SSIM 0.9611) (no change)

    native RaisedButton_disabled_light cn1 RaisedButton_disabled_light
    Left: native widget. Right: Codename One render.

  • TextField_disabled_light -- 97.29% fidelity (SSIM 0.9649) (no change)

    native TextField_disabled_light cn1 TextField_disabled_light
    Left: native widget. Right: Codename One render.

  • RaisedButton_normal_light -- 97.32% fidelity (SSIM 0.9613) (no change)

    native RaisedButton_normal_light cn1 RaisedButton_normal_light
    Left: native widget. Right: Codename One render.

  • TextField_normal_dark -- 97.61% fidelity (SSIM 0.9583) (no change)

    native TextField_normal_dark cn1 TextField_normal_dark
    Left: native widget. Right: Codename One render.

  • TextField_normal_light -- 97.62% fidelity (SSIM 0.9582) (no change)

    native TextField_normal_light cn1 TextField_normal_light
    Left: native widget. Right: Codename One render.

  • Slider_normal_dark -- 98.39% fidelity (SSIM 0.9900) (no change)

    native Slider_normal_dark cn1 Slider_normal_dark
    Left: native widget. Right: Codename One render.

  • Toolbar_normal_light -- 98.69% fidelity (SSIM 0.9739) (no change)

    native Toolbar_normal_light cn1 Toolbar_normal_light
    Left: native widget. Right: Codename One render.

  • Slider_normal_light -- 98.95% fidelity (SSIM 0.9908) (no change)

    native Slider_normal_light cn1 Slider_normal_light
    Left: native widget. Right: Codename One render.

  • Slider_disabled_dark -- 99.56% fidelity (SSIM 0.9927) (no change)

    native Slider_disabled_dark cn1 Slider_disabled_dark
    Left: native widget. Right: Codename One render.

  • Slider_disabled_light -- 99.59% fidelity (SSIM 0.9932) (no change)

    native Slider_disabled_light cn1 Slider_disabled_light
    Left: native widget. Right: Codename One render.

@github-actions

Copy link
Copy Markdown
Contributor

Cloudflare Preview

@shai-almog

shai-almog commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

@shai-almog

shai-almog commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

@github-actions

Copy link
Copy Markdown
Contributor

✅ Continuous Quality Report

Test & Coverage

Static Analysis

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

Generated automatically by the PR CI workflow.

@shai-almog

shai-almog commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 303 screenshots: 303 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 43ms / native 3ms = 14.3x speedup
SIMD float-mul (64K x300) java 41ms / native 3ms = 13.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 61.000 ms
Base64 CN1 decode 76.000 ms
Base64 SIMD encode 86.000 ms
Base64 encode ratio (SIMD/CN1) 1.410x (41.0% slower)
Base64 SIMD decode 78.000 ms
Base64 decode ratio (SIMD/CN1) 1.026x (2.6% slower)
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) 32.000 ms
Image applyMask (SIMD on) 19.000 ms
Image applyMask ratio (SIMD on/off) 0.594x (40.6% faster)
Image modifyAlpha (SIMD off) 23.000 ms
Image modifyAlpha (SIMD on) 17.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.739x (26.1% faster)
Image modifyAlpha removeColor (SIMD off) 31.000 ms
Image modifyAlpha removeColor (SIMD on) 25.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.806x (19.4% faster)

ParparVM vs HotSpot (JDK 25): Windows x64

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

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

Benchmark Cores Time RAM Status
hello (WinHelloMain) 4 1.87x (base 1.89x, -1.0%) 0.83x (base 0.82x, +1.2%) ok
translator (self) 4 0.90x (base 0.89x, +0.9%) 0.50x (base 0.55x, -9.3%) ok
intArithmetic 4 1.10x (base 1.10x, +0.4%) 0.06x (base 0.06x, -1.4%) ok
longArithmetic 4 1.08x (base 1.08x, -0.0%) 0.06x (base 0.06x, +0.7%) ok
mathTranscendental 4 0.85x (base 0.85x, +0.5%) 0.06x (base 0.06x, +3.8%) ok
arraySequential 4 1.79x (base 1.72x, +4.0%) 0.38x (base 0.38x, +0.1%) ok
arrayRandom 4 1.02x (base 1.01x, +0.1%) 0.23x (base 0.23x, +0.6%) ok
objectAllocation 4 1.25x (base 1.25x, -0.4%) 0.30x (base 0.29x, +2.0%) ok
valueEscape 4 0.10x (base 0.10x, -1.3%) 0.05x (base 0.04x, +2.9%) ok
hashMapChurn 4 1.29x (base 1.39x, -7.0%) 0.10x (base 0.10x, +5.4%) ok
stringBuilding 4 1.39x (base 1.36x, +2.6%) 0.32x (base 0.28x, +15.4%) ok
recursion 4 1.38x (base 1.43x, -3.4%) 0.06x (base 0.06x, +2.6%) ok
quicksort 4 1.11x (base 1.11x, -0.5%) 0.12x (base 0.12x, +0.3%) ok

Result: no regression

@shai-almog

shai-almog commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 303 screenshots: 303 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 9V45 96-Core Processor (baseline linux-x64@amd-epyc-9v45-96-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 20% (time) / 25% (RAM) above its baseline in vm/selfhost/perf-baseline/ is a regression and fails; one that far below is an improvement, reported but not failed (a row whose calibration runs were noisier carries a wider tolerance), and for RAM the change must also exceed 0.05x in absolute terms. Both run unpinned on all of the runner's CPUs, with their own default thread counts.

Benchmark Cores Time RAM Status
hello (LinuxHelloMain) 4 1.23x (base 0.92x, +34.5%) 0.90x (base 0.84x, +7.3%) ok
translator (self) 4 0.65x (base 0.64x, +1.8%) 0.63x (base 0.55x, +15.2%) ok
intArithmetic 4 1.00x (base 1.00x, -0.0%) 0.04x (base 0.06x, -30.2%) ok
longArithmetic 4 0.99x (base 0.99x, -0.7%) 0.04x (base 0.07x, -47.3%) ok
mathTranscendental 4 1.19x (base 1.20x, -1.0%) 0.04x (base 0.06x, -29.6%) ok
arraySequential 4 2.98x (base 2.91x, +2.4%) 0.36x (base 0.36x, +1.3%) ok
arrayRandom 4 1.00x (base 1.04x, -3.4%) 0.20x (base 0.23x, -11.0%) ok
objectAllocation 4 1.52x (base 1.61x, -5.9%) 0.28x (base 0.24x, +19.2%) ok
valueEscape 4 0.10x (base 0.12x, -15.2%) 0.03x (base 0.04x, -30.0%) ok
hashMapChurn 4 1.28x (base 1.31x, -2.1%) 0.09x (base 0.09x, +8.6%) ok
stringBuilding 4 1.52x (base 1.58x, -3.6%) 0.26x (base 0.22x, +19.6%) ok
recursion 4 1.32x (base 1.34x, -1.5%) 0.04x (base 0.08x, -46.8%) ok
quicksort 4 1.05x (base 1.06x, -1.6%) 0.10x (base 0.11x, -11.6%) ok

Result: no regression

@shai-almog

shai-almog commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 303 screenshots: 303 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 20% (time) / 25% (RAM) above its baseline in vm/selfhost/perf-baseline/ is a regression and fails; one that far below is an improvement, reported but not failed (a row whose calibration runs were noisier carries a wider tolerance), and for RAM the change must also exceed 0.05x in absolute terms. Both run unpinned on all of the runner's CPUs, with their own default thread counts.

Benchmark Cores Time RAM Status
hello (LinuxHelloMain) 4 1.22x (base 1.02x, +19.5%) 0.87x (base 0.66x, +31.6%) ok
translator (self) 4 0.78x (base 0.70x, +11.5%) 0.44x (base 0.43x, +3.1%) ok
intArithmetic 4 1.04x (base 1.04x, -0.1%) 0.04x (base 0.03x, +8.0%) ok
longArithmetic 4 0.79x (base 0.79x, -0.0%) 0.03x (base 0.03x, +5.5%) ok
mathTranscendental 4 1.10x (base 1.10x, +0.4%) 0.04x (base 0.03x, +9.9%) ok
arraySequential 4 0.40x (base 0.36x, +10.8%) 0.37x (base 0.37x, +0.4%) ok
arrayRandom 4 0.94x (base 0.94x, +0.3%) 0.20x (base 0.20x, +1.0%) ok
objectAllocation 4 1.92x (base 1.77x, +8.7%) 0.36x (base 0.37x, -2.1%) ok
valueEscape 4 0.51x (base 0.51x, -0.1%) 0.03x (base 0.03x, +6.5%) ok
hashMapChurn 4 0.82x (base 0.84x, -2.7%) 0.13x (base 0.12x, +8.3%) ok
stringBuilding 4 1.47x (base 1.57x, -6.1%) 0.26x (base 0.26x, +0.0%) ok
recursion 4 1.56x (base 1.43x, +9.1%) 0.04x (base 0.04x, +3.5%) ok
quicksort 4 0.99x (base 0.99x, -0.2%) 0.10x (base 0.09x, +2.3%) ok

Result: no regression

@shai-almog

shai-almog commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 303 screenshots: 303 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 27ms / native 3ms = 9.0x speedup
SIMD float-mul (64K x300) java 27ms / native 2ms = 13.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 42.000 ms
Base64 CN1 decode 46.000 ms
Base64 SIMD encode 51.000 ms
Base64 encode ratio (SIMD/CN1) 1.214x (21.4% slower)
Base64 SIMD decode 48.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) 2.000 ms
Image createMask ratio (SIMD on/off) 0.400x (60.0% faster)
Image applyMask (SIMD off) 13.000 ms
Image applyMask (SIMD on) 11.000 ms
Image applyMask ratio (SIMD on/off) 0.846x (15.4% 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) 16.000 ms
Image modifyAlpha removeColor (SIMD on) 9.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.563x (43.8% faster)

@shai-almog

shai-almog commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 303 screenshots: 303 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 68.000 ms
Base64 SIMD encode 73.000 ms
Base64 encode ratio (SIMD/CN1) 1.159x (15.9% slower)
Base64 SIMD decode 71.000 ms
Base64 decode ratio (SIMD/CN1) 1.044x (4.4% slower)
Image encode benchmark iterations 100
Image createMask (SIMD off) 5.000 ms
Image createMask (SIMD on) 2.000 ms
Image createMask ratio (SIMD on/off) 0.400x (60.0% faster)
Image applyMask (SIMD off) 17.000 ms
Image applyMask (SIMD on) 17.000 ms
Image applyMask ratio (SIMD on/off) 1.000x (0.0% slower)
Image modifyAlpha (SIMD off) 17.000 ms
Image modifyAlpha (SIMD on) 11.000 ms
Image modifyAlpha ratio (SIMD on/off) 0.647x (35.3% faster)
Image modifyAlpha removeColor (SIMD off) 22.000 ms
Image modifyAlpha removeColor (SIMD on) 15.000 ms
Image modifyAlpha removeColor ratio (SIMD on/off) 0.682x (31.8% faster)

ParparVM vs HotSpot (JDK 25): Windows arm64

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

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

Benchmark Cores Time RAM Status
hello (WinHelloMain) 4 1.63x (base 1.45x, +12.5%) 0.85x (base 0.75x, +13.3%) ok
translator (self) 4 0.89x (base 0.84x, +6.2%) 0.51x (base 0.51x, -0.1%) ok
intArithmetic 4 1.04x (base 1.04x, -0.0%) 0.06x (base 0.06x, +6.4%) ok
longArithmetic 4 0.79x (base 0.80x, -0.0%) 0.06x (base 0.06x, +6.8%) ok
mathTranscendental 4 0.73x (base 0.72x, +1.1%) 0.07x (base 0.06x, +4.6%) ok
arraySequential 4 0.37x (base 0.46x, -19.0%) 0.39x (base 0.39x, +0.2%) ok
arrayRandom 4 0.95x (base 0.94x, +1.2%) 0.23x (base 0.23x, +0.9%) ok
objectAllocation 4 1.79x (base 1.82x, -1.6%) 0.32x (base 0.43x, -24.4%) ok
valueEscape 4 0.76x (base 0.76x, +0.0%) 0.05x (base 0.05x, +5.6%) ok
hashMapChurn 4 1.00x (base 0.98x, +1.0%) 0.11x (base 0.12x, -8.3%) ok
stringBuilding 4 1.51x (base 1.43x, +6.0%) 0.27x (base 0.27x, -0.1%) ok
recursion 4 1.42x (base 1.46x, -2.9%) 0.07x (base 0.07x, +3.9%) ok
quicksort 4 1.01x (base 1.00x, +0.6%) 0.12x (base 0.12x, +1.9%) ok

Result: no regression

… as the snippet gate requires

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shai-almog
shai-almog merged commit 5afc7ae into master Dec 1, 2026
4 of 23 checks passed
@shai-almog
shai-almog deleted the design-import-tool branch December 1, 2026 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant