summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2016-11-03 15:58:02 +0000
committerRichard Hughes <richard@hughsie.com>2016-11-03 16:03:49 +0000
commite820ab1fec6a8fdedd5931c7681d9a59094a289e (patch)
treedbec3e0a4de001d8d857aee0088bfb568776c034 /client
parentabfed95fcf149dbd33473a516dc295a21e0eeb20 (diff)
downloadappstream-glib-e820ab1fec6a8fdedd5931c7681d9a59094a289e.tar.gz
Only load native languages when parsing AppStream data
This adds an optional flag that allows the node parser to ignore any nodes that do not match the native languages of the user. This increases startup speed of gnome-software by ~40ms but also drops the RSS by a massive 12Mb for the Fedora AppStream file.
Diffstat (limited to 'client')
-rw-r--r--client/as-util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/client/as-util.c b/client/as-util.c
index dee4934..991ae64 100644
--- a/client/as-util.c
+++ b/client/as-util.c
@@ -1291,6 +1291,7 @@ as_util_search (AsUtilPrivate *priv, gchar **values, GError **error)
store = as_store_new ();
as_store_set_add_flags (store,
AS_STORE_ADD_FLAG_USE_UNIQUE_ID |
+ AS_STORE_ADD_FLAG_ONLY_NATIVE_LANGS |
AS_STORE_ADD_FLAG_USE_MERGE_HEURISTIC);
if (!as_store_load (store,
AS_STORE_LOAD_FLAG_IGNORE_INVALID |