Rockbox General > Rockbox General Discussion

Dircache odd behaviour or not?

(1/2) > >>

baobab68:
A simple question about dircache: I am not sure if what I am seeing is new behaviour or if it was always like this - does dircache normally build the directory cache on every single boot?

I thought on earlier builds that I've used on my iRiver H320, it was somehow built once and then was quite quick to cache on subsequent boots. (I can't for the life of me think how that would be achieved from a technical point of view, but that's the way I remember it!)
What I am seeing on the player on startup is that my music resumes on startup, and according to the debug screens, the directory cache and track buffering seem to compete with each other. I seem to remember it wasn't like that before.

Please tell me I am wrong so I can stop thinking about how I am going to troubleshoot the problem.

I plan to defrag the device - hopefully having all the file allocation table together in one spot will help.

I must admit too, at the highly probable risk of getting flamed, I'm using an unsupported build. I thought it worth posting here in the hopes that responses might enlighten future people having issues with dircache. In case it's relevant, I'm using the build from here:

http://hendrik.feuerware.com/rockbox.htm

I am also slightly suspicious of multifont as I know it uses a lot of RAM (although I am only using one font, so it mightn't matter.

bao

AlexP:
The way it normally works is that dircache is built on first boot, and then on subsequent boots it scans for updates - rockbox has no way of knowing if you changed anything when off - i.e. you could have added music with the OF etc.

If it is performing the foreground scan on every boot, it shouldn't be.  However, please try with an official build.  Patches can change many things you would not expect.  We have that rule for a reason.

baobab68:
So the answer is "yes it is meant to work like that?"

Glad to know I'm not imagining that it used to work that way.

From a technical standpoint, is it cached in a file in order to survive reboots? I don't recall a file in \.rockbox that rings a bell re: dircache.

bao

roolku:
Dircache is built from scratch on every re-boot (unless you have a flashed firmware on h1x0 and it is hibernating in a file). The difference between foreground and background scan is that in the former case it doesn't know the required buffer size so it can't be allocated in advance. In the latter it will use the buffer size from the last foreground scan (+ some extra I think). 'Hibernating' (store cache on disk) can only work if there is no way to alter the disk contents without rockbox knowing and with current targets this can only be guaranteed in the above mentioned case of the h1x0.

Unfortunately there is currently an issue with buffering/concurrent disk access that makes the background building of the dircache have a negative effect on the responsiveness of the DAP at startup. Let's hope it gets resolved quickly.

AlexP:

--- Quote from: roolku on February 15, 2008, 09:26:34 AM ---Dircache is built from scratch on every re-boot (unless you have a flashed firmware on h1x0 and it is hibernating in a file). The difference between foreground and background scan is that in the former case it doesn't know the required buffer size so it can't be allocated in advance. In the latter it will use the buffer size from the last foreground scan (+ some extra I think).

--- End quote ---

Aha, cheers for the clarification.

Navigation

[0] Message Index

[#] Next page

Go to full version