summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1ba8b24)
raw | patch | inline | side by side (parent: 1ba8b24)
author | Max Kellermann <max@duempel.org> | |
Sat, 3 Oct 2009 16:28:18 +0000 (18:28 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Sat, 3 Oct 2009 16:28:18 +0000 (18:28 +0200) |
filelist_prepend() is quite expensive. Let's insert the NULL entry
first, and append all entries while they are received.
first, and append all entries while they are received.
src/screen_artist.c | patch | blob | history |
diff --git a/src/screen_artist.c b/src/screen_artist.c
index 95e4d2236683e4dfcb60cda029e5b3433a643fba..e88a04dbd0571b9bd689be52830f8d37c72da893 100644 (file)
--- a/src/screen_artist.c
+++ b/src/screen_artist.c
MPD_TAG_ALBUM, album);
mpd_search_commit(connection);
- browser.filelist = filelist_new_recv(connection);
+ browser.filelist = filelist_new();
+ /* add a dummy entry for ".." */
+ filelist_append(browser.filelist, NULL);
+
+ filelist_recv(browser.filelist, connection);
if (!mpd_response_finish(connection))
mpdclient_handle_error(c);
- /* add a dummy entry for ".." */
- filelist_prepend(browser.filelist, NULL);
-
#ifndef NCMPC_MINI
/* fix highlights */
screen_browser_sync_highlights(browser.filelist, &c->playlist);