aboutsummaryrefslogtreecommitdiffstats
path: root/src/mpdclient.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-15 13:27:33 +0200
committerMax Kellermann <max@duempel.org>2008-09-15 13:27:33 +0200
commit1c51c6681b366c1d5ee87f48553d4223ad4c198d (patch)
treecead22384084fd77e3462063b5248fce85059026 /src/mpdclient.h
parent3da600fbb0c33ec5cfb76e5341cf21c160592202 (diff)
downloadmpd-1c51c6681b366c1d5ee87f48553d4223ad4c198d.tar.gz
mpd-1c51c6681b366c1d5ee87f48553d4223ad4c198d.tar.xz
mpd-1c51c6681b366c1d5ee87f48553d4223ad4c198d.zip
use GArray for playlist instead of GList
Using a doubly linked list for the local playlist copy is a huge waste of both memory and CPU cycles. Use GArray instead of GList, which is much faster in this case.
Diffstat (limited to 'src/mpdclient.h')
-rw-r--r--src/mpdclient.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mpdclient.h b/src/mpdclient.h
index a93cec918..787839193 100644
--- a/src/mpdclient.h
+++ b/src/mpdclient.h
@@ -24,12 +24,10 @@ typedef struct
{
/* playlist id */
long long id;
- /* list length */
- guint length;
/* true if the list is updated */
gboolean updated;
/* the list */
- GList *list;
+ GArray *list;
} mpdclient_playlist_t;
@@ -135,7 +133,6 @@ gint mpdclient_playlist_update(mpdclient_t *c);
/* get playlist changes */
gint mpdclient_playlist_update_changes(mpdclient_t *c);
-GList *playlist_lookup(mpdclient_t *c, gint id);
mpd_Song *playlist_lookup_song(mpdclient_t *c, gint id);
mpd_Song *playlist_get_song(mpdclient_t *c, gint index);
gint playlist_get_index(mpdclient_t *c, mpd_Song *song);