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:

committed by
Max Kellermann

parent
afe6ce7210
commit
0bec1d3807
@@ -20,13 +20,14 @@
|
||||
#define DIRECTORY_H
|
||||
|
||||
#include "song.h"
|
||||
#include "songvec.h"
|
||||
|
||||
typedef List DirectoryList;
|
||||
|
||||
typedef struct _Directory {
|
||||
char *path;
|
||||
DirectoryList *subDirectories;
|
||||
SongList *songs;
|
||||
struct songvec songs;
|
||||
struct _Directory *parent;
|
||||
ino_t inode;
|
||||
dev_t device;
|
||||
|
Reference in New Issue
Block a user