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).
This commit is contained in:
Eric Wong
2008-09-23 20:48:39 +02:00
committed by Max Kellermann
parent afe6ce7210
commit 0bec1d3807
11 changed files with 211 additions and 112 deletions

View File

@@ -51,7 +51,7 @@ static int countSongsInDirectory(Directory * directory,
{
int *count = (int *)data;
*count += directory->songs->numberOfNodes;
*count += directory->songs.nr;
return 0;
}
@@ -362,7 +362,7 @@ static int sumSavedFilenameMemoryInDirectory(Directory * dir, void *data)
return 0;
*sum += (strlen(getDirectoryPath(dir)) + 1 - sizeof(Directory *)) *
dir->songs->numberOfNodes;
dir->songs.nr;
return 0;
}