[tracker/wip/carlosg/update-perf: 31/72] 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: 31/72] libtracker-sparql: Use concatenation to expand prefixes
- Date: Tue, 30 Aug 2022 15:39:41 +0000 (UTC)
commit 11b1f495cd4d276f1b74a908b6814154dc7ddc4f
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 85d964459..1d2a0e1ba 100644
--- a/src/libtracker-sparql/core/tracker-data-manager.c
+++ b/src/libtracker-sparql/core/tracker-data-manager.c
@@ -5471,7 +5471,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]