mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-14 14:22:13 +00:00
Use indexes when building the quirk prepared queries
This can save 250us on each query (of which we do a *lot*), and reduces the number of queries by about half if the user is using a libxmlb version that can convert from `_BOUND_TEXT` to `_BOUND_INDEX_TEXT`. The more devices detected, the bigger the difference, and without this patch fixing libxmlb would break fwupd as we'e been searching with an index, but not actually providing one.
This commit is contained in:
parent
210b9c4353
commit
a21e653161
@ -427,6 +427,10 @@ fu_quirks_check_silo(FuQuirks *self, GError **error)
|
||||
g_prefix_error(error, "failed to prepare query: ");
|
||||
return FALSE;
|
||||
}
|
||||
if (!xb_silo_query_build_index(self->silo, "quirk/device", "id", error))
|
||||
return FALSE;
|
||||
if (!xb_silo_query_build_index(self->silo, "quirk/device/value", "key", error))
|
||||
return FALSE;
|
||||
|
||||
/* success */
|
||||
return TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user