From 1952b762b0b7024c6a993e62ad957718ac669ac4 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 20 Sep 2008 16:20:48 -0700 Subject: Replace SongList with struct songvec Our linked-list implementation is wasteful and the SongList isn't modified enough to benefit from being a linked list. So use a more compact array of song pointers which saves ~200K on a library with ~9K songs (on x86-32). --- src/song.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/song.h') diff --git a/src/song.h b/src/song.h index d27596abd..c31c39829 100644 --- a/src/song.h +++ b/src/song.h @@ -24,6 +24,8 @@ #include "tag.h" #include "list.h" +#define SONG_KEY "key: " +#define SONG_MTIME "mtime: " #define SONG_BEGIN "songList begin" #define SONG_END "songList end" @@ -58,12 +60,7 @@ Song *addSongToList(SongList * list, const char *url, const char *utf8path, int printSongInfo(int fd, Song * song); -int printSongInfoFromList(int fd, SongList * list); - -void writeSongInfoFromList(int fd, SongList * list); - -void readSongInfoIntoList(FILE * fp, SongList * list, - struct _Directory *parent); +void readSongInfoIntoList(FILE * fp, struct _Directory *parent); int updateSongInfo(Song * song); -- cgit v1.2.3