[tracker/wip/carlosg/update-perf: 2/43] libtracker-sparql: Use concatenation to expand prefixes




commit 9869043f4cc0677c3cf2c339dd5ac7ea58687c34
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun May 22 18:46:34 2022 +0200

    libtracker-sparql: Use concatenation to expand prefixes
    
    Concatenating strings performs better than the more generic g_strdup_printf
    approach.

 src/libtracker-sparql/core/tracker-data-manager.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/libtracker-sparql/core/tracker-data-manager.c 
b/src/libtracker-sparql/core/tracker-data-manager.c
index 759867604..165b3f0df 100644
--- a/src/libtracker-sparql/core/tracker-data-manager.c
+++ b/src/libtracker-sparql/core/tracker-data-manager.c
@@ -5469,7 +5469,7 @@ tracker_data_manager_expand_prefix (TrackerDataManager  *manager,
 
        if (expanded) {
                if (sep) {
-                       *expanded = g_strdup_printf ("%s%s", expanded_ns, sep);
+                       *expanded = g_strconcat (expanded_ns, sep, NULL);
                } else {
                        *expanded = g_strdup (expanded_ns);
                }


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