From d095d52ed4aadd916bd025e1c39bbe2977da3997 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 23 Sep 2008 20:47:45 +0200 Subject: Directory: don't allocate stat information dynamically This should save a few thousand ops. Not worth it to malloc for such a small (3-words on 32-bit ARM and x86) structures. Signed-off-by: Eric Wong --- src/directory.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/directory.h') diff --git a/src/directory.h b/src/directory.h index be191bf5d..63ff6a548 100644 --- a/src/directory.h +++ b/src/directory.h @@ -23,17 +23,14 @@ typedef List DirectoryList; -typedef struct _DirectoryStat { - ino_t inode; - dev_t device; -} DirectoryStat; - typedef struct _Directory { char *path; DirectoryList *subDirectories; SongList *songs; struct _Directory *parent; - DirectoryStat *stat; + ino_t inode; + dev_t device; + unsigned stat; /* not needed if ino_t == dev_t == 0 is impossible */ } Directory; void readDirectoryDBIfUpdateIsFinished(void); -- cgit v1.2.3