perf(target): add slim slicer-mode ddk-ci.target as opt-in alternative - #1463
joaodinissf wants to merge 1 commit into
Conversation
e2ab961 to
1b95916
Compare
|
I also thought about the effect of using slicer on performance. If we go for it, why not do it directly in the current target instead of creating a new one? In the end we want the speed up even more for the target reloads/updates we do locally. |
The default ddk.target uses includeMode=planner, which provisions a complete install closure: PDE eagerly downloads 325MB/861 jars per workspace, 48% of which are source bundles that includeSource=false cannot remove (PDE's planner path plans in sources unconditionally). ddk-ci.target lists the actually-required units in slicer mode: ~205MB/440 jars, source bundles down from 411 to 30. Every unit was added in response to a concrete resolution error from the full reactor build and test suite (mvn clean verify green against -Dtarget.platform=ddk-ci). com.avaloq.tools.ddk.xtext.test's surefire runtime required the whole org.eclipse.xtext.sdk feature; replaced with the runtime/ui/xbase features plus the bundles it actually uses at test runtime, including org.eclipse.xtext.xtext.ui whose absence breaks .xtext grammar resource loading (registered EMF resource factory). Resolvable under both targets; full verify green under both. Opt in via -Dtarget.platform=ddk-ci. The default target is unchanged; switching the default is a separate decision. All locations slice with includeAllPlatforms="true": Tycho requires the same value on every location, and a platform-filtered root such as org.eclipse.jdt.launching.macosx (needed on macOS) is otherwise rejected when resolving for Linux or Windows. Synced with ddk.target: no sequenceNumber, no Xpand location, JavaSE-21 targetJRE. Assisted by Claude. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1b95916 to
14853aa
Compare
|
Closing. The slicer does make cold target resolution faster, but not by enough to justify keeping a hand-maintained 179-unit target in sync with every Eclipse, Xtext and Orbit update (roughly every six to eight weeks). As an opt-in file it would rot, since CI never builds it, and it had already drifted from ddk.target. As the default, we would pay that maintenance on every update to save 15 to 20 seconds per cold reload. @rubenporras, that is also my answer to your question: the gain doesn't justify the upkeep, opt-in or default. 🤖 Drafted with Claude Code |
Problem
The default
ddk.targetusesincludeMode="planner", which provisions a complete install closure. Cost per Eclipse workspace (and per CI cold start): 325 MB / 861 jars eagerly downloaded, 411 of them source bundles (105 MB). SettingincludeSource="false"does not help: PDE's planner path runs its plan-in-source-bundles pass unconditionally (nogetIncludeSource()check inP2TargetUtils), so sources are fetched for everything regardless of the flag.Change (opt-in; the default
ddk.targetfile is untouched)ddk-target/ddk-ci.target: the same repositories asddk.target,includeMode="slicer", SDK features replaced by runtime features, and every requirement-only bundle listed explicitly. Attached with classifierddk-ci; select with-Dtarget.platform=ddk-ci.includeAllPlatforms="true".org.eclipse.jdt.launching.macosxis needed on macOS but carries anosgi.os=macosxfilter, and a filtered root is rejected when resolving for Linux or Windows; Tycho requires the same value on all locations, so it applies to the whole file. Other platforms' fragments (SWT is the largest, ~2.6 MB each) become part of the slice; Tycho still wires only the matching ones.com.avaloq.tools.ddk.xtext.test(applies to both targets): the surefire runtime required the wholeorg.eclipse.xtext.sdkfeature; replaced with the xtext runtime/ui/xbase features plus the bundles the tests actually use at runtime — includingorg.eclipse.xtext.xtext.ui, whose EMF resource-factory registration is required to load.xtextgrammar resources (its absence was the cause of the first CI run's test failures). Resolvable under both targets.Every unit in the new file is traceable to a concrete resolution error: the file was grown by an error-driven loop (
mvn clean package/verifynaming the missing capability each iteration), not copied from anywhere.Measured (local, macOS aarch64; medians of ≥3 runs where stated; before the switch to
includeAllPlatforms="true", which adds the other platforms' fragments)ddk.targetddk-ci.targetvalidateVerification
mvn clean packagegreen (all modules), under both targets.com.jcraft.jschand the ECF/httpclient5 transport stack).mvn clean verifygreen with zero test failures under BOTH the default target andddk-ci.targeton macOS aarch64 (357+ tests across 81 test classes).ddk-ci.targetsucceeds for bothlinux/gtk/x86_64andmacosx/cocoa/aarch64(platform profile forced locally). Before theincludeAllPlatformschange the Linux resolution failed withorg.eclipse.jdt.launching.macosx … cannot be installed in this environment because its filter is not applicable. CI does not build this target yet, so no Linux build or test run has used it..launch,.product,plugin.xml, code): the only dynamic reference isddk-configuration/launches/devkit-run.launch, which uses the automatic bundle set (default=true) and therefore adapts; it is not used by CI.Known trade-offs: a workspace using
ddk-ci.targethas no source attachments (use the default target for source browsing), and the launched runtime workbench lacks IDE extras (xtend.ide, docs, examples). 30 source jars remain (embedded in the Xtext features' own feature.xml).CI numbers (added after workflow runs)
verifyworkflow, ubuntu runner: 10m39s (green run on the current commit) vs recent master runs median ~13m25s (n=8, range 11m49s–18m34s). Caveat: CI currently builds the default target, so this difference is likely cache warmth/runner variance rather than the change itself — the measured provisioning gains (−37% download, −93% source bundles, ~35–40% faster cold resolve) apply to workspace/CI environments that opt into-Dtarget.platform=ddk-ci. Switching CI to the slim target would be a follow-up once the team is comfortable.Assisted by Claude.