[tracker/wip/carlosg/update-perf: 16/18] core: Drop caching of scarcely run statements




commit e31c80667fb7ba1dfd7b39ac68e6963b84af2d2f
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Aug 20 17:19:38 2022 +0200

    core: Drop caching of scarcely run statements
    
    The graph management update statements are rarely run, we can avoid
    caching them.

 src/libtracker-sparql/core/tracker-data-update.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-sparql/core/tracker-data-update.c 
b/src/libtracker-sparql/core/tracker-data-update.c
index 5d8e8b011..93b5b862b 100644
--- a/src/libtracker-sparql/core/tracker-data-update.c
+++ b/src/libtracker-sparql/core/tracker-data-update.c
@@ -3378,7 +3378,7 @@ tracker_data_ensure_graph (TrackerData  *data,
                return 0;
 
        iface = tracker_data_manager_get_writable_db_interface (data->manager);
-       stmt = tracker_db_interface_create_statement (iface, TRACKER_DB_STATEMENT_CACHE_TYPE_UPDATE, error,
+       stmt = tracker_db_interface_create_statement (iface, TRACKER_DB_STATEMENT_CACHE_TYPE_NONE, error,
                                                      "INSERT OR IGNORE INTO Graph (ID) VALUES (?)");
        if (!stmt)
                return 0;
@@ -3404,7 +3404,7 @@ tracker_data_delete_graph (TrackerData  *data,
                return FALSE;
 
        iface = tracker_data_manager_get_writable_db_interface (data->manager);
-       stmt = tracker_db_interface_create_statement (iface, TRACKER_DB_STATEMENT_CACHE_TYPE_UPDATE, error,
+       stmt = tracker_db_interface_create_statement (iface, TRACKER_DB_STATEMENT_CACHE_TYPE_NONE, error,
                                                      "DELETE FROM Graph WHERE ID = ?");
        if (!stmt)
                return FALSE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]