Repository navigation
Device runtime: shrink the interpreter shims and compile them for size - #6403
Conversation
Every shim overrides every method its class inherits: about 104k overrides averaging 2.3 KB of machine code each, two thirds of the iOS executable, which exceeded the App Store's 500 MB limit once the interpreter bindings were on. Each override now calls a per-parameter-shape helper in a generated InterpCalls class that holds the argument array, the try/catch and the exception unwrapping; the override keeps only the sentinel test and its own super call. Behavior is unchanged case by case. The new ios.sizeOptimizedClasses build hint adds -Oz to the per-file compiler flags of the named classes in the generated Xcode project; the device runtime sets it for its shim package. Stripped device executable, same project: 579 MB -> 264 MB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The module is built on JDK 8 and on JDK 17, and ant skips an up-to-date class, so a JDK 17 build followed by a JDK 8 one ran GenerateFoldableSkins from version-61 class files and failed build-skins with UnsupportedClassVersionError -- which took the Hugo build, Maven verify and the quality report down with it in scripts/pre-push-gates.sh --full. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ios.optimizationLevel replaces ios.sizeOptimizedClasses: one clang level for the optimized configurations instead of -Oz on chosen classes. Simpler, and it shrinks the rest of the executable too; the slower code does not matter for a development tool. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Developer Guide build artifacts are available for download from this workflow run:
Developer Guide quality checks: |
Cloudflare Preview
|
|
Compared 403 screenshots: 403 matched. |
|
Compared 301 screenshots: 301 matched. Native Android coverage
✅ Native Android screenshot tests passed. Native Android coverage
Benchmark ResultsDetailed Performance Metrics
|
Native fidelity (Android, Material 3)54 pairs compared -- median 95.6%, worst 91.3% ( Distribution --
Geometry vs native (bbox offset / size ratio / center offset / corner radius) -- gated separately from the visual score
Side-by-side comparisons (worst first)
|
|
Compared 316 screenshots: 316 matched. Benchmark ResultsDetailed Performance Metrics
ParparVM vs HotSpot (JDK 25): Windows x64Runner CPU: AMD64 Family 26 Model 2 Stepping 1, AuthenticAMD (baseline 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
Result: no regression |
|
Compared 316 screenshots: 316 matched. Benchmark ResultsDetailed Performance Metrics
ParparVM vs HotSpot (JDK 25): Windows arm64Runner CPU: ARMv8 (64-bit) Family 8 Model D49 Revision 0, MICROSOFT CORPORATION (baseline 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
Result: no regression |
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
|
Compared 316 screenshots: 316 matched. ParparVM vs HotSpot (JDK 25): Linux x64Runner CPU: AMD EPYC 9V45 96-Core Processor (baseline 1 performance regression:
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
A change that moves performance ON PURPOSE records the new baseline in Result: performance regression |
|
Compared 316 screenshots: 316 matched. ParparVM vs HotSpot (JDK 25): Linux arm64Runner CPU: Neoverse-N2 (baseline 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
Result: no regression |
|
Compared 316 screenshots: 316 matched. Benchmark ResultsDetailed Performance Metrics
|
|
Compared 299 screenshots: 299 matched. Benchmark Results
Build and Run Timing
Detailed Performance Metrics
|
















































































































Codename One Instant's App Store upload was refused: the executable is 562 MB and Apple's limit is 500 MB. About two thirds of the executable is the roughly 1,650 generated interpreter shims. Each shim overrides every inherited method, and each override repeated the same template inline: build the argument array, dispatch, unwrap the exception, unbox.
The shims
InterpCalls.d_<shape>helper. There is one helper per signature shape, 258 in all, and each builds theObject[]and dispatches.The
-Ozbuild hintios.sizeOptimizedClasses: a comma-separated list of class-name prefixes.-Ozto the per-file compiler flags of those classes' translated sources in the generated Xcode project. Everything else keeps the configuration's optimization level.com.codenameone.devruntime.gen., its shim package.Measured on the binary (local Release device build, no LTO, stripped): the executable is now 264 MB, down from 562 MB.
Also fixed:
build-skinscompiledGenerateFoldableSkinsfor whichever JDK ran the build, and ant then skips a class that is already up to date. A JDK 17 build followed by a JDK 8 one therefore failed withUnsupportedClassVersionError. That brokepre-push-gates.sh --full. The generator is now compiled for Java 8.Verification
scripts/generate-interp-shims.shpasses: the shims compile, the load-bearing shims are present, and generating twice gives the same output.XcodeSizeOptimizedSourcesTesttests.pre-push-gates.sh --fullis clean.🤖 Generated with Claude Code