[gnome-software] trivial: Generate the search token cache at setup time
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Generate the search token cache at setup time
- Date: Thu, 3 Nov 2016 20:28:55 +0000 (UTC)
commit afd96a7f190a2a8960eb34ba996d5710cec6b45d
Author: Richard Hughes <richard hughsie com>
Date: Wed Nov 2 16:17:23 2016 +0000
trivial: Generate the search token cache at setup time
This should give us some more accurate profiling numbers for the initial
search operation.
configure.ac | 2 +-
src/plugins/gs-flatpak.c | 3 +++
src/plugins/gs-plugin-appstream.c | 3 +++
3 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 321b81f..ca54387 100644
--- a/configure.ac
+++ b/configure.ac
@@ -84,7 +84,7 @@ dnl ---------------------------------------------------------------------------
dnl - Check library dependencies
dnl ---------------------------------------------------------------------------
PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.20.0 gio-unix-2.0)
-PKG_CHECK_MODULES(APPSTREAM, appstream-glib >= 0.6.4)
+PKG_CHECK_MODULES(APPSTREAM, appstream-glib >= 0.6.5)
PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0 >= 2.31.5)
PKG_CHECK_MODULES(JSON_GLIB, json-glib-1.0 >= 1.1.1)
PKG_CHECK_MODULES(SQLITE, sqlite3)
diff --git a/src/plugins/gs-flatpak.c b/src/plugins/gs-flatpak.c
index 7016ce9..e179a81 100644
--- a/src/plugins/gs-flatpak.c
+++ b/src/plugins/gs-flatpak.c
@@ -233,6 +233,9 @@ gs_flatpak_add_apps_from_xremote (GsFlatpak *self,
return FALSE;
}
+ /* ensure the token cache */
+ as_store_load_search_cache (store);
+
/* only add the specific app for noenumerate=true */
if (flatpak_remote_get_noenumerate (xremote)) {
g_autofree gchar *tmp = NULL;
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index f950730..8b8dd95 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -289,6 +289,9 @@ gs_plugin_setup (GsPlugin *plugin, GCancellable *cancellable, GError **error)
G_CALLBACK (gs_plugin_appstream_store_changed_cb),
plugin);
+ /* ensure the token cache */
+ as_store_load_search_cache (priv->store);
+
/* add search terms for apps not in the main source */
origins = gs_plugin_appstream_get_origins_hash (items);
for (i = 0; i < items->len; i++) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]