floere / playa

Work in progress! Small, does what I needed. Fully searchable. Cool shortcuts. Cmd-tab, tell it something, cmd-tab again.
8 stars 2 forks source link

Problems with large music libraries #3

Closed severin closed 12 years ago

severin commented 12 years ago

When I try to load my whole library (14000 tracks), I get the following error:

bin/playa '~/Music/*/*.mp3'  
sh: /usr/local/bin/id3tool: Argument list too long
floere commented 12 years ago

Thanks! I will have to chunk it cleverly. (Or you? :) )

I think just expanding the first * or \ it encounters, then running each chunk in id3tool would be sufficient. (Only after this error occurs, I assume)

floere commented 12 years ago

Could you try the latest version and give feedback?

severin commented 12 years ago

It works now, thanks!

floere commented 12 years ago

Great. How many songs of total songs does it find?

severin commented 12 years ago

"13363 songs indexed in 7.7s."

floere commented 12 years ago

Nice! The thing to do now is to dump the index for a given pattern on exit and when starting checking if there is a difference eg. in the number of songs - and then indexing if yes.

floere commented 12 years ago

(Assuming you don't want to wait 7 seconds on startup)

floere commented 12 years ago

I broke the search, but at least the indexer dumps the data now - and reloads the index on restart. Should be orders of magnitude faster. Reindex using the --index option.

floere commented 12 years ago

Tell me how fast it is.

severin commented 12 years ago

Seems to be a step backwards :(

$ bin/playa '~/Music/*/.mp3' 13363 songs indexed in 8.0s.

floere commented 12 years ago

If it says indexed it just indexed it – if it says loaded, it has loaded it. First run: indexing. Second run: loading :) So... run it again.

floere commented 12 years ago

Remember that the thing currently still always loads all the music info - that can also be cached, if need be.

severin commented 12 years ago

The "First run: indexing. Second run: loading" bit seems not to work for me:

~/own/playa (master) ☺ $ time bin/playa '~/Music/**/*.mp3' && time bin/playa '~/Music/**/*.mp3'
13363 songs indexed in 7.8s.
Years   0 1968 1970 1973 1975 1979 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 200 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 99
Genres  alternative blues crossover dance easy electronic funk hip-hop indie instrumental jazz listening other pop pop/funk punk r&b rap reggae rock soul soundtrack style trip-hop unknown

Keys:
  enter        -> next song
  tab          -> toggle repeat one/all
Searches:
  *            -> all songs
  /<genre>     -> search only in genre
  .<song name> -> search only in song titles
Commands:
  index? size?

> * (all) Intro | RJD2

Ctrl-C
bin/playa '~/Music/**/*.mp3'  11,18s user 4,65s system 93% cpu 17,001 total

13363 songs indexed in 7.9s.
Years   0 1968 1970 1973 1975 1979 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 200 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 99
Genres  alternative blues crossover dance easy electronic funk hip-hop indie instrumental jazz listening other pop pop/funk punk r&b rap reggae rock soul soundtrack style trip-hop unknown

Keys:
  enter        -> next song
  tab          -> toggle repeat one/all
Searches:
  *            -> all songs
  /<genre>     -> search only in genre
  .<song name> -> search only in song titles
Commands:
  index? size?

> * (all) 03 - Azabeats - Montag Mittag | Music/Azabeats - The Then Unknown Village of Nearly Birds

Ctrl-C
bin/playa '~/Music/**/*.mp3'  11,28s user 4,21s system 91% cpu 16,863 total
~/own/playa (master) ☺ $ 

Also, total startup time is around 17 seconds for me (I hit Ctrl-C as soon as the music started playing in the run above)

floere commented 12 years ago

Try again :)

On 29 September 2012 23:22, Severin Schoepke notifications@github.comwrote:

The "First run: indexing. Second run: loading" bit seems not to work for me

severin commented 12 years ago

Seems to be working now:

time bin/playa '~/Music/**/*.mp3' && time bin/playa '~/Music/**/*.mp3'
Loaded 13363 songs in 7.5s.
Indexed songs in 10.3s.

Ctrl-C
bin/playa '~/Music/**/*.mp3'  12,89s user 4,89s system 90% cpu 19,626 total

Loaded 13363 songs in 7.3s.
Loaded song index in 1.3s.

Ctrl-C
bin/playa '~/Music/**/*.mp3'  4,15s user 4,50s system 80% cpu 10,730 total
floere commented 12 years ago

Cool.

1.3s is surprisingly high! Ok, next up we can dump the music info into a file and load that as well.

Btw, song info change on song change is done as well. Have fun!