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




commit c4d2d5b714598cbc9b62413556fa4c257bf990f2
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 9bb741020..fb2d071a8 100644
--- a/src/libtracker-sparql/core/tracker-data-update.c
+++ b/src/libtracker-sparql/core/tracker-data-update.c
@@ -3383,7 +3383,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;
@@ -3409,7 +3409,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]