summaryrefslogtreecommitdiff
path: root/libappstream-glib/as-self-test.c
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 /libappstream-glib/as-self-test.c
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 'libappstream-glib/as-self-test.c')
-rw-r--r--libappstream-glib/as-self-test.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libappstream-glib/as-self-test.c b/libappstream-glib/as-self-test.c
index 954947a..b5511d5 100644
--- a/libappstream-glib/as-self-test.c
+++ b/libappstream-glib/as-self-test.c
@@ -3814,6 +3814,7 @@ as_test_store_speed_appstream_func (void)
for (i = 0; i < loops; i++) {
g_autoptr(AsStore) store = NULL;
store = as_store_new ();
+ as_store_set_add_flags (store, AS_STORE_ADD_FLAG_ONLY_NATIVE_LANGS);
ret = as_store_from_file (store, file, NULL, NULL, &error);
g_assert_no_error (error);
g_assert (ret);