[tracker/wip/carlosg/update-perf: 20/61] 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: 20/61] libtracker-sparql: Use concatenation to expand prefixes
- Date: Mon, 22 Aug 2022 22:07:42 +0000 (UTC)
commit efafca6ca70734881cbcd3cb26045dd6379b7342
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 38dffd984..3b3ac3011 100644
--- a/src/libtracker-sparql/core/tracker-data-manager.c
+++ b/src/libtracker-sparql/core/tracker-data-manager.c
@@ -5465,7 +5465,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]