trivial: Do not call setup() vfuncs when we're never calling coldplug

Now all plugins define custom GTypes in the _init() vfunc, and so
there's no need to actually probe devices to just get access to those.

This means you can get results from `fwupdtool get-firmware-types`
about two orders of magnitude quicker.
This commit is contained in:
Richard Hughes 2022-01-05 10:29:14 +00:00
parent 32284e1afa
commit 133e712fc9

View File

@ -6993,9 +6993,10 @@ fu_engine_load(FuEngine *self, FuEngineLoadFlags flags, GError **error)
fu_engine_set_status(self, FWUPD_STATUS_LOADING);
/* add devices */
fu_engine_plugins_setup(self);
if (flags & FU_ENGINE_LOAD_FLAG_COLDPLUG)
if (flags & FU_ENGINE_LOAD_FLAG_COLDPLUG) {
fu_engine_plugins_setup(self);
fu_engine_plugins_coldplug(self);
}
/* coldplug backends */
if (flags & FU_ENGINE_LOAD_FLAG_COLDPLUG) {