Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide
translations



Rockbox mail archive

Subject: RE: max 200 entries in a dir. why?

RE: max 200 entries in a dir. why?

From: John Wood <John.Wood_at_royalblue.com>
Date: Mon, 12 Aug 2002 12:37:48 -0400

Well you could sort the directory the first time you enter it (store the
whole thing in RAM, sort it, retain the indices and then discard the folder
names), and then one page becomes 200 contiguous entries in that sorted
list. You're still not storing much more than a page (just the sorted
directory offset list), you maintain the same speed as you would with the
200 limit.

But then again I'm not that familiar with the dir.c code so I could be
talking crap..

-----Original Message-----
From: Björn Stenberg [mailto:bjorn_at_haxx.se]
Sent: Monday, August 12, 2002 11:21 AM
To: rockbox_at_cool.haxx.se
Subject: Re: max 200 entries in a dir. why?


John Wood wrote:
> Why do we have to load the entire folder at once? Can't we just load one
> page at a time?

The primary reason that idea has been thrown out is that it makes sorting
impossible. FAT32 directories do not store filnames in any particular order,
so "Song1.mp3" can be on the first page while "Song2.mp3" is on the last.
And I just know you'd hate that. :-)

We have a fix pending that will changed the number limit to a size limit.
That is, in dirs with short filenames we'll support a higher number of files
than in dirs with long filenames.

The purpose of this fix, however, is to *decrease* the amount of memory used
for the file list. So for dirs with many very long filenames, we may well
end up supporting less than 200 files.

-- 
Björn
*************************************************************************    
This message is intended only for the stated addressee(s) 
and may be confidential.  Access to this email by anyone 
else is unauthorised. Any opinions expressed in this email
do not necessarily reflect the opinions of royalblue. 
Any unauthorised disclosure, use or dissemination, 
either whole or in part is prohibited,.   If you are not the 
intended recipient of this message, please notify 
the sender immediately.
*************************************************************************
Received on 2002-08-12

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy