Files
OrcaSlicer/src/libslic3r
gedanke 5a136a25d1 perf: speed up startup and show progress in splash screen (#13667)
* perf: speed up startup and show progress in splash screen

Cold-start was ~15 s. Profiled in GUI_App::on_init_inner: 5 s in
preset_bundle->load_presets (sequential vendor loading of ~3000 JSON
profile files), 3.7 s in new MainFrame(), and a 1.5 s splash screen
that closed long before init finished — so the user stared at a
frozen blank screen for several seconds with no feedback.

Changes:

- PresetBundle::load_system_presets_from_json: parallelize vendor
  loading with TBB. ORCA_FILAMENT_LIBRARY is loaded first
  synchronously (it is the inheritance base for filaments); the
  remaining vendors are loaded in parallel into separate PresetBundle
  instances, then sequentially merged. On a typical setup this drops
  load_presets from ~5 s to ~3.5 s; the saving scales with vendor
  count and CPU cores.

- SplashScreen: remove the wxSPLASH_TIMEOUT flag so the splash stays
  visible until the main window is shown explicitly, and add status
  updates at each slow init phase ("Loading printer and filament
  profiles", "Creating main window", "Loading current preset",
  "Showing main window"). The splash is destroyed right after
  mainframe->Show(true).

- MainFrame: FileHistory::LoadThumbnails moved to a detached
  background thread. The previous synchronous call opened every recent
  3MF file at startup — on macOS that triggered the TCC permission
  dialog for ~/Downloads mid-launch, freezing the whole app until the
  user clicked. Letting it run in the background means the UI is
  responsive from the start and thumbnails populate when ready.

* revert: keep LoadThumbnails on the main thread (review feedback)

SoftFever pointed out the detached thread introduces race conditions
(e.g. MainFrame::open_recent_project() reading while the thread writes
m_thumbnails) and that thumbnails may not appear if the homepage shows
before it finishes. LoadThumbnails already uses tbb::parallel_for
internally, so the call-site offload gave no real speedup. Reverted to
the original synchronous call. The macOS TCC-dialog concern that
motivated this will be handled properly in the lazy-init refactor.

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
2026-05-16 14:42:25 +08:00
..
2024-10-05 21:53:16 +03:00
2026-05-10 02:21:13 +08:00
2026-03-24 09:18:38 -07:00
2023-08-08 19:08:13 +08:00
2026-03-13 02:12:10 -07:00
2026-03-13 02:12:10 -07:00
2023-12-01 10:42:45 +00:00
2024-08-22 10:13:45 +03:00
2025-06-14 21:05:25 +08:00
2026-04-25 18:14:51 +08:00
2026-04-23 00:21:19 +08:00
2025-10-28 15:29:47 +08:00
2023-08-08 19:08:13 +08:00
2026-03-24 09:18:38 -07:00
2026-03-24 09:18:38 -07:00
2026-05-04 15:52:34 +08:00
2024-01-26 20:18:10 +08:00
2026-05-11 19:38:40 +08:00
2026-05-13 09:13:09 -03:00
2025-12-08 22:42:11 +08:00
2023-07-07 17:25:51 +08:00
2023-12-01 10:42:45 +00:00
2026-03-13 01:56:51 -07:00
2024-05-12 23:35:41 +08:00
2025-10-28 15:29:55 +08:00
2026-03-24 09:18:38 -07:00
2025-09-18 17:08:18 +08:00
2025-09-18 17:08:18 +08:00
2025-12-08 22:42:11 +08:00
2026-03-13 01:56:51 -07:00
2026-03-13 01:56:51 -07:00
2024-01-26 20:18:10 +08:00
2026-03-13 01:56:51 -07:00
2026-03-24 09:18:38 -07:00
2026-05-04 15:52:34 +08:00
2026-03-13 01:56:51 -07:00
2026-03-13 01:56:51 -07:00
2026-05-11 19:38:40 +08:00
2025-12-08 22:42:11 +08:00
2026-05-10 02:21:13 +08:00
2023-11-04 11:41:03 +08:00
2025-11-18 19:50:48 -05:00
2023-08-08 19:08:13 +08:00
2023-08-08 19:08:13 +08:00
2026-01-29 19:19:37 +08:00
2026-01-23 17:05:56 +08:00
2025-12-08 22:42:11 +08:00
2025-12-08 22:42:11 +08:00