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: Suggestion: Store the directory structure in ram
From: Mike Payson (mpayson_at_dawgdayz.com)
Date: 2003-01-08


On Wednesday 08 January 2003 10:41 am, Björn Stenberg wrote:
> Marcel Groenendijk wrote:
> > Wouldn't it be handy to store the directory
> > structure in ram (Especially with the bigger ram mod.) Or would it cost
> > to much ram and thus performance?
>
> Yes it would. The size of 'ls -R' on my 40gig archos is almost 400KB. We
> have decided to instead focus on buffering as much mp3 data as possible,
> thus getting longer run time.

I have two suggestions for fixing this... One would be to cache the directory
structure in a database of some sort. This should make it faster to navigate
at the expense of a bit of disk space.

If that won't work, how about simply keeping the listing of the current
direcory in RAM? That should result in much more manageable memory usage. In
this option, the best way to handle it would be to always store the current
directory (or perhaps only a portion of it on large directories), but
precache the contents of the directory above you when you enter browse mode.
You would lose a little more buffer whenever you enter browse mode, but it
should be much more responsive when navigating. You'll still have to wait a
bit when navigating downward (into directories), but overall, I think that
this would work well.

-- 
Mike Payson  |  DawgDayz Dog Walking & Pet Sitting
(206) 280-7295 | www.dawgdayz.com | mpayson_at_dawgdayz.com



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