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.
This commit is contained in:
Norman Feske 2022-09-14 12:34:48 +02:00
parent 003247d883
commit 6df66a77d0
2 changed files with 0 additions and 5 deletions

View File

@ -185,7 +185,6 @@ struct Sculpt::Deploy
{
_managed_deploy_rom.update();
handle_deploy();
_depot_query.trigger_depot_query();
}
/**

View File

@ -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;
}