Rockbox mail archiveSubject: Re: Suggestion: Store the directory structure in ram
Re: Suggestion: Store the directory structure in ram
From: Mike Payson <mpayson_at_dawgdayz.com>
Date: Wed, 8 Jan 2003 11:12:49 -0800
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.comReceived on 2003-01-08
Page was last modified "Sat May 23 08:12:40 2020" The Rockbox Crew