From d2cf74027c2c252181ab16c1348281c252665353 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 18 Jan 2014 19:08:39 +0100 Subject: Song: embed the Tag object statically into class Song Reduces overhead because we need to manage only one memory allocation. According to valgrind/massif, we save 7%. --- src/db/ProxyDatabasePlugin.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/db/ProxyDatabasePlugin.cxx') diff --git a/src/db/ProxyDatabasePlugin.cxx b/src/db/ProxyDatabasePlugin.cxx index 9f4d3d31c..4b44d9a87 100644 --- a/src/db/ProxyDatabasePlugin.cxx +++ b/src/db/ProxyDatabasePlugin.cxx @@ -524,7 +524,7 @@ Convert(const struct mpd_song *song) for (const auto *i = &tag_table[0]; i->d != TAG_NUM_OF_ITEM_TYPES; ++i) Copy(tag, i->d, song, i->s); - s->tag = tag.CommitNew(); + tag.Commit(s->tag); return s; } -- cgit v1.2.3