[gnome-software/gnome-3-22] trivial: Generate the search token cache at setup time
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-3-22] trivial: Generate the search token cache at setup time
- Date: Mon, 7 Nov 2016 16:40:41 +0000 (UTC)
commit cd7ee82b4aa177ac7e626c3fe537256e4b5e2ed9
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.
(cherry picked from commit afd96a7f190a2a8960eb34ba996d5710cec6b45d)
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 db2db98..5296fd7 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 2cea359..b522160 100644
--- a/src/plugins/gs-flatpak.c
+++ b/src/plugins/gs-flatpak.c
@@ -197,6 +197,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 5b96f71..1398a3a 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -285,6 +285,9 @@ gs_plugin_setup (GsPlugin *plugin, GCancellable *cancellable, GError **error)
G_CALLBACK (gs_plugin_appstream_store_app_removed_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]