aboutsummaryrefslogtreecommitdiffstats
path: root/src/UpdateContainer.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-18 19:08:39 +0100
committerMax Kellermann <max@duempel.org>2014-01-19 02:58:55 +0100
commitd2cf74027c2c252181ab16c1348281c252665353 (patch)
tree50dc8efe859419ad9f266bc277049bae34790c78 /src/UpdateContainer.cxx
parentbc966577ffb2354f44ebb85ceb83b188bb6907b6 (diff)
downloadmpd-d2cf74027c2c252181ab16c1348281c252665353.tar.gz
mpd-d2cf74027c2c252181ab16c1348281c252665353.tar.xz
mpd-d2cf74027c2c252181ab16c1348281c252665353.zip
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%.
Diffstat (limited to 'src/UpdateContainer.cxx')
-rw-r--r--src/UpdateContainer.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/UpdateContainer.cxx b/src/UpdateContainer.cxx
index 1d219930f..635006344 100644
--- a/src/UpdateContainer.cxx
+++ b/src/UpdateContainer.cxx
@@ -113,10 +113,7 @@ update_container_file(Directory &directory,
plugin.ScanFile(child_path_fs.c_str(),
add_tag_handler, &tag_builder);
- if (tag_builder.IsDefined())
- song->tag = tag_builder.CommitNew();
- else
- tag_builder.Clear();
+ tag_builder.Commit(song->tag);
db_lock();
contdir->AddSong(song);