From 9d42f4e0ed81969b4fcf1c20e60e867a2defe636 Mon Sep 17 00:00:00 2001 From: Igor Kuzmin Date: Wed, 19 Aug 2009 21:21:29 +0200 Subject: update: don't re-read unchanged container files MPD checks if every flac (possibly other types as well) file contains cuesheet on every update, which produces unneeded I/O. My music collection is on NFS share, so it's quite noticeable. IMHO, it shouldn't re-read unchanged files, so I wrote simple patch to fix it. --- NEWS | 1 + src/update.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 324f054e1..dbf780524 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ ver 0.15.3 (2009/??/??) * output: - fix stuttering due to uninitialized variable +* update: don't re-read unchanged container files ver 0.15.2 (2009/08/15) diff --git a/src/update.c b/src/update.c index bdf84ce36..593198cb9 100644 --- a/src/update.c +++ b/src/update.c @@ -502,7 +502,8 @@ update_regular_file(struct directory *directory, { struct song* song = songvec_find(&directory->songs, name); - if (plugin->container_scan != NULL) + if (!(song != NULL && st->st_mtime == song->mtime) && + plugin->container_scan != NULL) { if (update_container_file(directory, name, st, plugin)) { -- cgit v1.2.3