[tracker/wip/carlosg/update-perf: 24/65] libtracker-sparql: Use concatenation to expand prefixes
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/update-perf: 24/65] libtracker-sparql: Use concatenation to expand prefixes
- Date: Tue, 23 Aug 2022 09:32:50 +0000 (UTC)
commit 2c16f048b24a71c84772f99637d292346be7c443
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]