mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-12-01 01:12:59 -05:00
Speed up startup by skipping repeated refreshes and building the UV editor on first use (#16930)
Startup to the main window is about 280 ms faster with 24 filaments and about 170 ms faster with 4 (Windows, Bambu H2S, median of 4 runs). - Filament lists are refreshed once per config change instead of once for each of `filament_colour`, `filament_type` and `filament_is_support`. - The UV editor pane is built the first time it is shown, through `Lazy<T>`, and keeps its saved dock position when it was not built in a session. - The SLA import dialog is built on first use, through `Lazy<T>`. - The sidebar and main window are no longer frozen while the window is hidden. - The filament combos are not filled before the main window is shown. The printer tab fills them once while presets load. - The object settings refresh is skipped until the main window is shown, when no object can be selected yet.
This commit is contained in:
6 files changed
+126
-67
No files matched your search
@@ -4326,7 +4326,9 @@ void GUI_App::set_live_printer_agent(std::shared_ptr<IPrinterAgent> agent)
|
||||
}
|
||||
|
||||
m_agent->set_printer_agent(agent);
|
||||
sidebar().update_all_preset_comboboxes();
|
||||
// Before mainframe is shown this runs from load_current_presets(), right after
|
||||
// printer refilled the filament combos; no printer is connected yet, so they would not change
|
||||
sidebar().update_all_preset_comboboxes(mainframe == nullptr || mainframe->IsShown());
|
||||
}
|
||||
|
||||
std::string GUI_App::resolve_printer_agent_id(const std::string& stored_id) const
|
||||
|
||||
Reference in new issue
Block a user