From 6df66a77d0f9f61dfdff6c6114c715a1c45d6cda Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 14 Sep 2022 12:34:48 +0200 Subject: [PATCH] sculpt: avoid superfluous depot queries This patch avoids repetitive depot queries at the start of the Sculpt system. We don't need to trigger a query unconditionally whenever the managed/deploy changes because the call of 'handle_deploy' triggers a query when needed. We don't need to trigger a query once the prepare step is completed because the depot_query component is spawned at this point. The initial blueprint produced by the depot_query component, in turn, triggers the 'handle_deploy' mechanics in the sculpt manager. The constructor of the Sculpt manager's 'Main' does not need to call 'depot_deploy' because the prepare step - which is a precondition for the deployment - cannot be completed at this point anyway. --- repos/gems/src/app/sculpt_manager/deploy.h | 1 - repos/gems/src/app/sculpt_manager/main.cc | 4 ---- 2 files changed, 5 deletions(-) diff --git a/repos/gems/src/app/sculpt_manager/deploy.h b/repos/gems/src/app/sculpt_manager/deploy.h index 9670454c38..296ff54834 100644 --- a/repos/gems/src/app/sculpt_manager/deploy.h +++ b/repos/gems/src/app/sculpt_manager/deploy.h @@ -185,7 +185,6 @@ struct Sculpt::Deploy { _managed_deploy_rom.update(); handle_deploy(); - _depot_query.trigger_depot_query(); } /** diff --git a/repos/gems/src/app/sculpt_manager/main.cc b/repos/gems/src/app/sculpt_manager/main.cc index 8b8940e40f..4ead90948d 100644 --- a/repos/gems/src/app/sculpt_manager/main.cc +++ b/repos/gems/src/app/sculpt_manager/main.cc @@ -1239,7 +1239,6 @@ struct Sculpt::Main : Input_event_handler, */ _handle_gui_mode(); _storage.handle_storage_devices_update(); - _deploy.handle_deploy(); _handle_pci_devices(); _handle_runtime_config(); _handle_clicked(); @@ -1737,9 +1736,6 @@ void Sculpt::Main::_handle_runtime_state() if (exit_state.exited) { _prepare_completed = _prepare_version; - /* trigger deployment */ - _deploy.handle_deploy(); - /* trigger update and deploy */ reconfigure_runtime = true; }