Rockbox Technical Forums

Rockbox General => Rockbox General Discussion => Topic started by: lalittle on April 24, 2007, 06:50:34 PM

Title: Directory Cache vs. Load to RAM - clarification.
Post by: lalittle on April 24, 2007, 06:50:34 PM
I'm not entirely clear on the difference between the "Directory Cache" disk setting and the "Load to RAM" database setting.

From the manual, it sounds like they provide similar functions for different types of viewing -- i.e. that they both speed up browsing by loading data to the RAM, but that the "Directory Cache" effects browsing by "files," whereas the "Load to RAM" setting effects browsing by the "database."

Is this correct?

Thanks for clarification on this,

Larry
Title: Re: Directory Cache vs. Load to RAM - clarification.
Post by: bluebrother on April 24, 2007, 06:53:39 PM
Is this correct?
Yes.

Dircache caches the filesystem structure, so browsing the file system is much smoother as it can use the cached structure. "Load to RAM" is part of the database settings and selects whether the database itself is loaded to RAM. If it's not loaded to RAM every time you access the database the database file on disk needs to get accessed, resulting in a disk access (and thus disk spinup).
Title: Re: Directory Cache vs. Load to RAM - clarification.
Post by: lalittle on April 24, 2007, 07:42:07 PM
Is this correct?
Yes.

Dircache caches the filesystem structure, so browsing the file system is much smoother as it can use the cached structure. "Load to RAM" is part of the database settings and selects whether the database itself is loaded to RAM. If it's not loaded to RAM every time you access the database the database file on disk needs to get accessed, resulting in a disk access (and thus disk spinup).

Thanks.

Does the "Directory Cache" setting have any effect if you have Rockbox set to browse by database?  In other words, is the "Directory Cache" setting still something to consider if you only browse by database, or is it moot in this case?

Thanks again,

Larry
Title: Re: Directory Cache vs. Load to RAM - clarification.
Post by: Mad Cow on April 24, 2007, 10:30:47 PM
If you never use the directory browser, then it is completely useless.
Title: Re: Directory Cache vs. Load to RAM - clarification.
Post by: mikeage on April 24, 2007, 10:47:30 PM
I thought Directory Cache helps Database scan for new (and deleted?) files
Title: Re: Directory Cache vs. Load to RAM - clarification.
Post by: Mad Cow on April 24, 2007, 11:31:34 PM
I thought Directory Cache helps Database scan for new (and deleted?) files

That's true, but only if automatic scanning is turned on, and even then it doesn't always work.
Title: Re: Directory Cache vs. Load to RAM - clarification.
Post by: mikeage on April 24, 2007, 11:47:03 PM
Quote from: Mad Cow link=topic=10115.msg77516#msg77516
That's true, but only if automatic scanning is turned on, and even then it doesn't always work.

I assume you're referring to "Update Automatically".

When you say it doesn't work, are you suggesting there's a bug, or it's not designed to work in all cases.

If it's the first, then Directory Cache certainly has a purpose outside of file browsing...
Title: Re: Directory Cache vs. Load to RAM - clarification.
Post by: lalittle on April 24, 2007, 11:56:13 PM
On the subject of "Update Now" feature, this has NEVER worked for me.  If I use the "Update" function, the database becomes completely corrupt, with songs listing out of order, some of which include track numbers while others don't.  A new "initialize" does not work, nor does deleting the database files (.tcd files if memory serves.)  In order to get the database correct again, I have to completley delete the rockbox folder and start over again.

Larry
Title: Re: Directory Cache vs. Load to RAM - clarification.
Post by: Mad Cow on April 25, 2007, 07:00:39 PM
Quote from: Mad Cow link=topic=10115.msg77516#msg77516
That's true, but only if automatic scanning is turned on, and even then it doesn't always work.

I assume you're referring to "Update Automatically".

When you say it doesn't work, are you suggesting there's a bug, or it's not designed to work in all cases.

If it's the first, then Directory Cache certainly has a purpose outside of file browsing...

It's probably a bug, but I don't really mind it because I always do a manual update every time I add more music.
Title: Re: Directory Cache vs. Load to RAM - clarification.
Post by: bluebrother on April 25, 2007, 07:43:28 PM
It's probably a bug, but I don't really mind it because I always do a manual update every time I add more music.
Dircache is required for the auto update of the database to find deleted files.