|
Rockbox mail archiveSubject: Re: max 200 entries in a dir. why?Re: max 200 entries in a dir. why?
From: Bjoern Fischer <bfischer_at_Techfak.Uni-Bielefeld.DE>
Date: Tue, 13 Aug 2002 05:52:24 +0200 Hello, > > Why not buffer the first 200 entries of the directory into RAM, then (when > > the user scrolls beyond the 200th entry) access the drive > > and read the next 200 entries into the buffer? Didn't anyone think of > > this before, or is it impossible? > > If you do it that way, AFAIK, it should be a very simple modification. The > problem is purely with directory sorting, as was pointed out earlier. Still, > I'd personally say it's better to list all the files in the wrong order than > to just list the first 200, since the order will still be wrong like that > anyway. Another approach would be to require structured directory names, e.g. 0001_Freakpower 0002_Gus_Gus 0003_ZZ-Top ...you get the idea. A (Perl/Bourne-Shell)-Script or the sync software takes care that the numbering properly reflects the lexicographic ordering. The firmware doesn't need to perform sorting operations at all. But this is all nothing compared to... ...yet another approach: Soon HDD write operations will be implemented (for both, recorder AND player, did I get this right?). Then it is possible to maintain an (hidden) index file for each directory, that is automatically updated by the firmware. This also takes the burden of sorting off every directory access. These index files can also be maintained by external software, but I would prefer the 'self-contained' solution. All in all, I would recommend, that the rockbox firmware should be kept as lean as possible. All non-vital stuff like screen savers games and more-than-200-dirents should be available as an opt-in at compile time (roughly this is already the case). It wouldn't hurt much to make 2 or 3 different binary versions of each release: 'low fat', 'normal' and 'tasty'. BTW: The original ROM based firmware, is it copied into RAM or does it remain in ROM while running? Bjorn (Fischer) Received on 2002-08-13 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |