summaryrefslogtreecommitdiff
path: root/libappstream-glib/as-store.h
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-store.h
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-store.h')
-rw-r--r--libappstream-glib/as-store.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libappstream-glib/as-store.h b/libappstream-glib/as-store.h
index 3d4a34a..e2b9a56 100644
--- a/libappstream-glib/as-store.h
+++ b/libappstream-glib/as-store.h
@@ -98,6 +98,7 @@ typedef enum {
* @AS_STORE_ADD_FLAG_PREFER_LOCAL: Local files will be used by default
* @AS_STORE_ADD_FLAG_USE_UNIQUE_ID: Allow multiple apps with the same AppStream ID
* @AS_STORE_ADD_FLAG_USE_MERGE_HEURISTIC: Use a heuristic when adding merge components
+ * @AS_STORE_ADD_FLAG_ONLY_NATIVE_LANGS: Only load native languages
*
* The flags to use when adding applications to the store.
**/
@@ -106,6 +107,7 @@ typedef enum {
AS_STORE_ADD_FLAG_PREFER_LOCAL = 1 << 0, /* Since: 0.2.2 */
AS_STORE_ADD_FLAG_USE_UNIQUE_ID = 1 << 1, /* Since: 0.6.1 */
AS_STORE_ADD_FLAG_USE_MERGE_HEURISTIC = 1 << 2, /* Since: 0.6.1 */
+ AS_STORE_ADD_FLAG_ONLY_NATIVE_LANGS = 1 << 3, /* Since: 0.6.5 */
/*< private >*/
AS_STORE_ADD_FLAG_LAST
} AsStoreAddFlags;