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




commit 4bfd070ffea072d160f0d1fe233837fea117f9bd
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]