|
Rockbox mail archiveSubject: search a stringsearch a string
From: François-Xavier Houard <idefx_at_iname.com>
Date: Thu, 5 Sep 2002 15:31:14 +0200 so, i've been working last few days on something to search a text entry in the mp3 files. My goal was to make something like the "j" key in xmms; so i did it, but it was awfully slow (45 secs to scan 64 files). Then i decided to follow the advices i was given on irc, and, with mats lidell, we thought of some kind of database on the device, generate on the PC. I tried an arbitrary-choosed format for the db, and tried to implement it to make a first try. And i'm happy to annonce you that, using the same algorithm, searching a 2 word entry ("marsalis blase") on 592 files takes from 2 to 5 seconds (on a recorder device). This is nice (i think), and the possibility offered by the use of that kind of DB could be huge, like fast-dir-browsing, fast-playlist-generation, fast displaying-information, fast-sorting... So, i'd like to know which feature would really be appreciated (and worked on by other guy for example), to see how we could improve the database format. Here is how we think it for the moment: One database for the whole filesystem: filename title artist album filename title artist ... and another file, just to tell where start each directory in the database, maybe like that: jazz0 classical:726 classical/Mozart:942 (where the classical directory begin at the 726th byte, and classical/Mozart at the 942th byte) this way, scanning the whole device wouldn't need the openning of too much files, and scanning one dir may always take nearly the same time. So, if anyone have a suggestion, an idea, want's to create a text input, or a database generation stuff for windows (and even for linux, for the moment, i don't use directory, so i generate the database using : mp3info -p "%f\n%t\n%a\n%l\n", but a perl script that could also work recursively and generate the directory database would be welcome...), just post it ;) I will send a patch later, when i'll get the directory stuff work, and when i'll have replaced my strcasestr by a boyer moore algorithme, that should be much quicker. Bye François-Xavier Houard Received on 2002-09-05 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |