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



Rockbox mail archive

Subject: Re: source of 200 file limit
From: Daniel Stenberg (daniel_at_haxx.se)
Date: 2002-08-22


On Thu, 22 Aug 2002, Lucas Gonze wrote:

> I'm wondering what the source of the 200-files-in-a-dir limit is. Can
> anyone explain the underlying issues? Are they algorithmic or just about
> flipping a constant?

We need all files in memory for sorting, ram-based playlist etc. Changing
this is more than just a quick patch.

Previously: yes, a struct array with 200 entries, each entry with room for a
full 260 bytes file name. (total 52KB buffer)

Now: we have 16KB buffer that is used for file names only. Very scientifical
research (a few of us ran a one-liner on our mp3 collections) has shown that
the average mp3 file name is less than 40 bytes long. 16KB is then fine for
400 files of average length. Make the file names shorter and you can have
more files. ;-)

And yes, these are still #defines that make up the new buffer so when you
build your own firmware, you can tweak these values at will.

-- 
Daniel "Bagder" Stenberg -- http://rockbox.haxx.se/



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa