Repository navigation
Orca port 4B-2: startup splash phases + progress bar (#13667, #14155); full-set preset load determinism + benchmark - #683
Merged
Merged
Conversation
…gress in splash screen Upstream 5a136a2. Two halves; only the splash half is new to us. PresetBundle.cpp (parallel vendor loading): superseded, not ported. Our load_system_presets_from_json already does what OrcaSlicer#13667 does and more: - 17206cb (2026-09-13): OrcaFilamentLibrary first into *this*, the other vendors parsed in parallel (tbb::parallel_for, grain 1) into their own bundles with *this* as base_bundle, merged sequentially in vendor order. This is OrcaSlicer#13667's step 1/2/3 one for one, plus validation-mode exceptions rethrown per vendor in order and an ORCA_PRESET_LOAD_SEQUENTIAL escape hatch. - bc3b7dd: per-file parallel parse inside each vendor (BBL is the critical path) and the per-vendor CBOR parse cache (#255 atomic writes), with a thread-local C numeric locale per worker chunk (#222). - 11e73c6: the splash is held open through startup (timer stopped, closed explicitly by close_startup_splash) - the same fix as upstream's dropping wxSPLASH_TIMEOUT - and stage B runs off the calling thread while the GUI keeps the splash animation ticking. GUI_App.cpp (splash phase lines): ported. The splash now names the phase: "Loading printer & filament profiles", "Creating main window", "Loading current presets" (our existing, already translated string instead of upstream's "Loading current preset") and "Showing main window". Adapted: the line goes through the active-splash pointer (set_startup_splash_phase) rather than the local scrn, because our splash can be closed by user input under a wxYield; no extra wxYield (SetText repaints with Update(), and the animation tick re-applies the line every frame); Chinese keeps its double dots like the first line. Deft
… screen Upstream 8d84204. The splash gets a progress bar that steps with the startup phases OrcaSlicer#13667 named: 5 (loading configuration), 30 (printer & filament profiles), 70 (creating main window), 85 (current presets), 95 (showing main window). Same step values as upstream; the bar never moves back. Adapted to our splash, which is a composed bitmap with a slicing animation rather than upstream's paint handler: - SetText(text, progress = -1) draws the bar into the frame bitmap next to the loading line. AdvanceFrame() re-applies the last line every frame with -1, so the bar survives every animation frame at its last value. - The bar is a slim rounded track under the loading line, inset clear of the card's rounded corners (upstream's full-width bottom strip would be clipped by our rounded window shape), filled in the wordmark's red instead of Orca teal. - SetText now composes and sets the bitmap once instead of setting the bare frame and then the labelled one. - No final SetText(100) before Destroy(): close_startup_splash() takes the splash down right after the main frame is shown, so a 100% frame would never be seen. Deft
…m test and load benchmark Edge-only, for package 4B-2. No change to how the app loads presets. - PresetBundle::set_sequential_load_override / set_parse_cache_override and sequential_load() / parse_cache_enabled(). The two function-local statics that read ORCA_PRESET_LOAD_SEQUENTIAL and ORCA_PRESET_CACHE once now go through these: same environment semantics by default, but a test can compare the sequential and parallel loads (and cache on/off) inside one process, which the cached statics made impossible. - test_preset_load_full_set.cpp [PresetLoadFullSet]: copies the whole shipped resources/profiles into a scratch data dir's system/ folder, adds user presets (one on a BBL system filament, a detached parent in base/ with a child of it (#653), a process and a printer), and loads it with load_presets() five times: sequential without cache (the reference), parallel with a cold cache (writes it), parallel with the warm cache, and twice parallel without cache. Every preset of every collection must match line for line (order, name, alias, inherits, vendor, system / default / visible flags, setting/filament/base ids, renamed_from, and a FNV-1a hash of the resolved config), plus the filament alias table, the vendor/model/variant list and the selection after load_selections. - [.][Benchmark][PresetLoadBenchmark] (hidden): times load_presets() on the same data dir in four modes - sequential/no cache, parallel/no cache, parallel/cache cold, parallel/cache warm - ORCA_BENCH_RUNS times each (default 5) and prints PRESET_LOAD_BENCH lines with median/min/max. Deft
It passed in edgebuild job 484 but took 144 s on the VM (copying the 13k-file profile set and hashing every preset five times). The small synthetic [PresetLoadDeterminism] cases keep guarding the default run; this one runs on request with "[PresetLoadFullSet]". Tag-only change, not rebuilt. Deft
aceRage
marked this pull request as ready for review
October 24, 2026 14:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Package 4B-2 of the Orca upstream catch-up (
tests/orca_port_plan_remaining.md, section 3 4B-2): parallel vendor loading and startup progress. 2 upstream PRs ported: OrcaSlicer#13667 only its splash half (its PresetBundle half was already on main), OrcaSlicer#14155 adapted. 0 skipped. 2 Edge commits (test hooks and tests).Bottom line: no change to how presets load. Parallel vendor loading, the ordered merge, the held-open splash and the CBOR cache came in with perf/startup on 2026-09-13 (17206cb, bc3b7dd, 11e73c6). That leaves this PR with the splash phase lines, a progress bar, and the tests and benchmark the plan asked for. The cache default is untouched (the owner decides that in 4B-3a).
Base: origin/main 0b3af03. Main has not moved since.
Ports
5a136a25d1)8d84204aeb)Deviations from upstream, and why
g_active_splash, not the localscrn. Our splash can close itself on user input during awxYield, soscrnmay already be gone. There's no extrawxYield:SetTextrepaints withUpdate(), and the animation tick puts the line back every frame. Chinese keeps its double dots. "Loading current preset" reuses our already translated "Loading current presets".SetText(text, progress).AdvanceFrame()reapplies it every animation frame (progress -1 keeps the last value), and the bar never goes back.SetText(100)beforeDestroy().close_startup_splash()takes the splash down right after the main window shows, so a 100% frame would never be seen.Edge commits
PresetBundle::set_sequential_load_override/set_parse_cache_override(+sequential_load(),parse_cache_enabled()). The two function-local statics that readORCA_PRESET_LOAD_SEQUENTIAL/ORCA_PRESET_CACHEnow go through these. With no override set they read the environment exactly as before. They exist so one test process can compare the load modes.test_preset_load_full_set.cpp:[.][Preset][PresetLoadFullSet](determinism, hidden). It copies the whole shippedresources/profiles(59 vendor manifests) into a scratch data dir'ssystem/and adds user presets: one on a BBL system filament, a detached parent inbase/with a child of it (Fix user presets built on a detached preset vanishing #653), a process and a printer. Then it runsload_presets()five times: sequential with no cache (the reference), parallel with a cold cache, parallel with a warm cache, and parallel with no cache twice. It compares, line for line, every preset of all three collections in order (name, alias, inherits, vendor, system/default/visible, setting/filament/base ids, renamed_from, FNV-1a hash of the resolved config), the filament alias table (every holder of each alias, in lookup order), the vendor/model/variant list, and the selection afterload_selections. It's hidden because it takes about 144 s (the 13k-file copy plus hashing); run it with"[PresetLoadFullSet]". The small synthetic[PresetLoadDeterminism]cases still guard the default run.[.][Benchmark][PresetLoadBenchmark](hidden): timesload_presets()in four modes,ORCA_BENCH_RUNSruns each (default 5).Conflicts with our own work
CNumericLocalesSetterinload_vendor_configs_from_json), and so do the per-file parse chunks. TBB nested stealing only nests setters on one thread, which the thread-local depth counter handles. Unchanged here.GUI_App.cppandtests/libslic3r/CMakeLists.txt;git merge-treeagainst it is clean. 8-1, OD5 and OD6 edit option lists inPresetBundle.cpp/Preset.cpp, different hunks (OD5 merge-tree clean). 4B-3 (cache design) would build on the overrides added here.Tests
C:/Dev/EdgeSlicerTest/pkg_4b2. The test filter was~[NotWorking]~[.],[PresetLoadBenchmark], so that run included the full-set test, which was not yet hidden.[!shouldfail]cases in test_mixed_filament and test_wipe_tower_estimate. slic3rutils_tests: all 1403 cases passed (19274 assertions).[.]tag to the full-set test and was not rebuilt.Timings (system + user preset load,
load_presets(), full shipped set, VM, 5 runs each)These are without the GUI, from the hidden benchmark.
ORCA_PRESET_CACHE=0Branch vs main: the load code is the same except that the two env flags are now read through a function, so main's numbers are the same rows. The win that OrcaSlicer#13667 promises (8.1 s to 3.0 s, -63%) has been on main since 2026-09-13. The warm cache costs about +0.5 s over cache-off; that's 4B-3a's decision. 4B-1's startup log put
preset_bundle->load_presetsat 3.2-3.8 s on a 16-model set, which matches.G-code gate
Baseline
_baseline1009229 (CLI, scratch datadir). Main past it has only #650, post-processing scripts. Candidate = test copyC:/Dev/EdgeSlicerTest/pkg_4b2, edgebuild--gate, estimates ignored.No G-code change was expected either: the only non-test code is the splash (GUI) and the reading of two env flags.
Owner hand test
Test copy:
C:/Dev/EdgeSlicerTest/pkg_4b2No printer needed. Mac: not needed (no platform-specific code; the OSX
wxYieldinSetTextis kept).