Rockbox Technical Forums

Rockbox General => Rockbox General Discussion => Topic started by: Zsan on June 07, 2007, 02:10:47 PM

Title: Database - Does it work as badly as I think?
Post by: Zsan on June 07, 2007, 02:10:47 PM
I'm trying to use the Database feature on my 5.5g 80gig iThing. I've enabled Load to RAM and Directory Structure, but each and every time I select a song to play, it has to find it in some list. This takes ten-twenty seconds.

Can this become instant? Is it because shuffle is on? Or am I doing somehting else wrong?
Title: Re: Database - Does it work as badly as I think?
Post by: Mikerman on June 07, 2007, 03:16:36 PM
Presumably this is unique to you/your player, as the database feature is just as instantaneous as the File system on my iRiver iHP-140.  Hopefully an iPod user will have some answers for you.
Title: Re: Database - Does it work as badly as I think?
Post by: Zsan on June 07, 2007, 04:07:19 PM
Hm, that sounds promising. Let's hope I missed a setting somewhere, then.
Title: Re: Database - Does it work as badly as I think?
Post by: Llorean on June 07, 2007, 04:12:34 PM
Have you enabled Dircache?
Title: Re: Database - Does it work as badly as I think?
Post by: Raineer on June 07, 2007, 04:24:49 PM
Are you saying that every time you select a song from the list it takes 10-20 seconds before playback begins?  Or do you mean when you first click 'database' to bring up the list?

What if you just hit 'next' while a song is playing, any delay there?
Title: Re: Database - Does it work as badly as I think?
Post by: Zsan on June 08, 2007, 02:02:38 AM
My apoligies for a late reply. It takes 10-20 seconds when I select a song, and there is a message in the center of the screen: Searching, (Counter, going down) found. When I hit next, it is faster, and even when I enqueue a file, it's faster (Say, almost instant on the first, 3 seconds on the second.)

Dircache is enabled.
Title: Re: Database - Does it work as badly as I think?
Post by: bascule on June 08, 2007, 02:48:02 AM
How many music files in your database (Plugins > Stats will tell you).

It may just be, if you've filled your 80GB, that you have a massive database...

You say you have enabled load to RAM, which is good, but have you rebooted the player since then. If not, the setting may not actually be in force. This setting really should fix the problem, so make absolutely sure it is set.

Alternatively, if you are trying to select songs immediately after start-up, when the database is still being loaded, then it it can be slow and/or buggy.
Title: Re: Database - Does it work as badly as I think?
Post by: lights0ut on June 08, 2007, 04:44:28 AM
Just wanted to add that to reboot means to shut down by holding play, then restart by pressing centre. If you hold menu + centre, it does a hard reset which does not save your settings.
Title: Re: Database - Does it work as badly as I think?
Post by: Zsan on June 08, 2007, 07:13:49 AM

Just wanted to add that to reboot means to shut down by holding play, then restart by pressing centre. If you hold menu + centre, it does a hard reset which does not save your settings.

Oh lord, that explains a bit. Even so, I checked, and they are both on. I constantly reboot the player (Did it with a Play hold then centre hold this time) and it did scan for dirs, and it seems Database load to RAM is on. I also reinstalled RB a few times already.

I did NOT fill the 80 GB at all. There's 2668 or so music files on my player, a total of 3694 files. Also, after it's searched for the files (Like I said, the counter goes down from about the total number of sonjgs I have.) and it plays the song, if I select another, it will search again. Leaving it on for a bit doesn't help.

It is aggrevating me a little bit, because it seems I am doing something wrong.

Does anybody with an 80gig iPod want my entire rockbox dir, see if that helps?
Title: Re: Database - Does it work as badly as I think?
Post by: bascule on June 08, 2007, 09:57:06 AM
Better to write a config file and post that (Settings > Manage Settings > Write .cfg file)

It still sounds like the Database is not in RAM somehow... ???
Title: Re: Database - Does it work as badly as I think?
Post by: Zsan on June 08, 2007, 10:23:21 AM

Better to write a config file and post that (Settings > Manage Settings > Write .cfg file)

It still sounds like the Database is not in RAM somehow... ???


The config also states that it is on.

Code: [Select]

# .cfg file created by rockbox r13492M-070525 - http://www.rockbox.org

volume: -21
balance: 0
bass: 0
treble: 0
channels: stereo
stereo_width: 100
shuffle: on
repeat: all
backlight timeout: 10
backlight timeout plugged: on
invert: off
flip display: off
invert cursor: on
statusbar: on
scrollbar: on
volume display: graphic
battery display: graphic
time format: 24hour
show icons: on
idle poweroff: 10
max files in playlist: 10000
max files in dir: 1000
battery capacity: 400
car adapter mode: off
userfont1: /.rockbox/fonts/nimbus-14.fnt
backlight filters first keypress: on
caption backlight: off
backlight fade in: 500ms
backlight fade out: 1s
scroll speed: 9
scroll delay: 1000
bidir limit: 50
Screen Scrolls Out Of View: off
scroll step: 6
screen scroll step: 16
scroll paginated: off
foreground color: FFFFFF
background color: 000000
play selected: on
party mode: off
volume fade: on
scan min step: 1
scan accel: 3
antiskip: 5s
disk spindown: 5
show files: all
sort case: off
follow playlist: off
playlist viewer icons: on
playlist viewer indices: on
playlist viewer track display: track name
recursive directory insert: off
autocreate bookmarks: off
autoload bookmarks: off
use most-recent-bookmarks: off
peak meter clip hold: 60
peak meter hold: 500ms
peak meter release: 8
peak meter dbfs: on
peak meter min: 60
peak meter max: 0
talk dir: off
talk file: off
talk menu: on
sort files: alpha
sort dirs: alpha
id3 tag priority: v2-v1
ipod scroll wheel fast threshold in clicks/sec: 125
ipod scroll wheel faster threshold in clicks/sec: 390
ipod scroll wheel fastest threshold in clicks/sec: 500
rec timesplit: off
rec sizesplit: off
rec channels: stereo
rec split type: Split
rec split method: Time
rec source: mic
prerecording time: 0
rec directory: /recordings
cliplight: off
cliplight: off
rec mic gain: 16
rec left gain: 0
rec right gain: 0
rec frequency: 44
rec format: wave
mp3_enc bitrate: 128
trigger start threshold: -35
trigger stop threshold: -45
trigger start duration: 0s
trigger stop postrec: 2s
trigger min gap: 1s
trigger mode: off
folder navigation: off
gather runtime data: on
replaygain: off
replaygain type: album
replaygain noclip: off
replaygain preamp: 0
beep: off
crossfade: off
crossfade fade in delay: 0
crossfade fade out delay: 0
crossfade fade in duration: 0
crossfade fade out duration: 0
crossfade fade out mode: crossfade
crossfeed: off
crossfeed direct gain: 15
crossfeed cross gain: 60
crossfeed hf attenuation: 160
crossfeed hf cutoff: 700
eq enabled: off
eq precut: 0
eq band 0 cutoff: 60
eq band 1 cutoff: 200
eq band 2 cutoff: 800
eq band 3 cutoff: 4000
eq band 4 cutoff: 12000
eq band 0 q: 7
eq band 1 q: 10
eq band 2 q: 10
eq band 3 q: 10
eq band 4 q: 7
eq band 0 gain: 0
eq band 1 gain: 0
eq band 2 gain: 0
eq band 3 gain: 0
eq band 4 gain: 0
dithering enabled: off
dircache: on
tagcache_ram: on
tagcache_autoupdate: off
default codepage: iso8859-1
warn when erasing dynamic playlist: off
backlight on button hold: off
eq hardware enabled: off
eq hardware band 0 cutoff: 105Hz
eq hardware band 0 gain: 0
eq hardware band 1 center: 300Hz
eq hardware band 1 bandwidth: narrow
eq hardware band 1 gain: 0
eq hardware band 2 center: 850Hz
eq hardware band 2 bandwidth: narrow
eq hardware band 2 gain: 0
eq hardware band 3 center: 2.4kHz
eq hardware band 3 bandwidth: narrow
eq hardware band 3 gain: 0
eq hardware band 4 cutoff: 6.9kHz
eq hardware band 4 gain: 0
hold_lr_for_scroll_in_list: on
show path in browser: off
pause on headphone unplug: off
rewind duration on pause: 0
disable autoresume if phones not present: off
Last.fm Logging: off
trigger type: stop
backlight timeout plugin: on
font: /.rockbox/fonts/nimbus-14.fnt
browserfont: /.rockbox/fonts/nimbus-14.fnt
wpsfont: /.rockbox/fonts/nimbus-14.fnt
menufont: /.rockbox/fonts/nimbus-14.fnt
recordfont: /.rockbox/fonts/nimbus-14.fnt
tunerfont: /.rockbox/fonts/nimbus-14.fnt
wps: /.rockbox/wps/jBlackGlass-5.wps
backdrop: /.rockbox/backdrops/jBlackGlass-5.bmp
usb charging: off
cuesheet support: off
listxpos: 10
listypos: 35
listlines: 14
listwidth: 300
start in screen: db
alarm wakeup screen: wps
iconset: /.rockbox/icons/tango.20x16x16.bmp
viewers iconset: /.rockbox/icons/tango_viewers.20x16x16.bmp


Yes, it's in there somewhere, sorry for the amount of text.

Title: Re: Database - Does it work as badly as I think?
Post by: MrMEC on June 08, 2007, 11:22:36 AM
I also have an 80GB iPod 5.5G and I'm having the exact same problem using database mode.  It's extremely annoying having to wait so long to play music as it "searches" what apparently is already supposed to be saved.  Before posting this I tested and it took between 3-4 minutes to begin playing all songs using database mode, and this is with dircache turned on and load to ram on (see settings below).

The tremendous battery drain while the disc is constantly spinning is also criminal, and makes me recall an old quote someone made some time back on the iaudiophile forums - "Rockbox rapes my battery."   :'(

Here's my config file as well - I'm smelling a problem here and really hope someone can help...


# .cfg file created by rockbox r13492M-070525 - http://www.rockbox.org

volume: -13
balance: 0
bass: -6
treble: 0
channels: stereo
stereo_width: 100
shuffle: on
repeat: all
backlight timeout: 10
backlight timeout plugged: on
invert: off
flip display: off
invert cursor: on
statusbar: on
scrollbar: off
volume display: graphic
battery display: graphic
time format: 24hour
show icons: off
idle poweroff: 10
max files in playlist: 8000
max files in dir: 350
battery capacity: 400
car adapter mode: off
userfont1: /.rockbox/fonts/helvR10.fnt
userfont2: /.rockbox/fonts/helvR12.fnt
userfont3: /.rockbox/fonts/helvR14.fnt
userfont4: /.rockbox/fonts/helvR18.fnt
backlight filters first keypress: off
caption backlight: off
backlight fade in: off
backlight fade out: 500ms
scroll speed: 9
scroll delay: 1000
bidir limit: 50
Screen Scrolls Out Of View: off
scroll step: 6
screen scroll step: 16
scroll paginated: off
foreground color: FFFFFF
background color: 000000
play selected: on
party mode: off
volume fade: on
scan min step: 1
scan accel: 3
antiskip: 5s
disk spindown: 3
show files: all
sort case: off
follow playlist: off
playlist viewer icons: on
playlist viewer indices: on
playlist viewer track display: track name
recursive directory insert: off
autocreate bookmarks: off
autoload bookmarks: off
use most-recent-bookmarks: off
peak meter clip hold: 60
peak meter hold: 500ms
peak meter release: 8
peak meter dbfs: on
peak meter min: 60
peak meter max: 0
talk dir: off
talk file: off
talk menu: on
sort files: alpha
sort dirs: alpha
id3 tag priority: v2-v1
ipod scroll wheel fast threshold in clicks/sec: 135
ipod scroll wheel faster threshold in clicks/sec: 235
ipod scroll wheel fastest threshold in clicks/sec: 400
rec timesplit: off
rec sizesplit: off
rec channels: stereo
rec split type: Split
rec split method: Time
rec source: mic
prerecording time: 0
rec directory: /recordings
cliplight: off
cliplight: off
rec mic gain: 16
rec left gain: 0
rec right gain: 0
rec frequency: 44
rec format: wave
mp3_enc bitrate: 128
trigger start threshold: -35
trigger stop threshold: -45
trigger start duration: 0s
trigger stop postrec: 2s
trigger min gap: 1s
trigger mode: off
folder navigation: off
gather runtime data: off
replaygain: off
replaygain type: album
replaygain noclip: off
replaygain preamp: 0
beep: off
crossfade: off
crossfade fade in delay: 0
crossfade fade out delay: 0
crossfade fade in duration: 0
crossfade fade out duration: 0
crossfade fade out mode: crossfade
crossfeed: off
crossfeed direct gain: 15
crossfeed cross gain: 60
crossfeed hf attenuation: 160
crossfeed hf cutoff: 700
eq enabled: on
eq precut: 50
eq band 0 cutoff: 150
eq band 1 cutoff: 392
eq band 2 cutoff: 807
eq band 3 cutoff: 4002
eq band 4 cutoff: 12000
eq band 0 q: 9
eq band 1 q: 12
eq band 2 q: 12
eq band 3 q: 12
eq band 4 q: 9
eq band 0 gain: 40
eq band 1 gain: -110
eq band 2 gain: -110
eq band 3 gain: -120
eq band 4 gain: 0
dithering enabled: off
dircache: on
tagcache_ram: on
click insert setting: original
tagcache_autoupdate: on
default codepage: iso8859-1
warn when erasing dynamic playlist: off
backlight on button hold: normal
eq hardware enabled: on
eq hardware band 0 cutoff: 105Hz
eq hardware band 0 gain: 0
eq hardware band 1 center: 300Hz
eq hardware band 1 bandwidth: narrow
eq hardware band 1 gain: 0
eq hardware band 2 center: 850Hz
eq hardware band 2 bandwidth: narrow
eq hardware band 2 gain: 0
eq hardware band 3 center: 2.4kHz
eq hardware band 3 bandwidth: narrow
eq hardware band 3 gain: 0
eq hardware band 4 cutoff: 6.9kHz
eq hardware band 4 gain: 0
hold_lr_for_scroll_in_list: on
show path in browser: off
pause on headphone unplug: off
rewind duration on pause: 0
disable autoresume if phones not present: off
Last.fm Logging: off
trigger type: stop
backlight timeout plugin: on
font: /.rockbox/fonts/helvR12.fnt
browserfont: /.rockbox/fonts/helvR12.fnt
wpsfont: /.rockbox/fonts/helvR10.fnt
menufont: /.rockbox/fonts/helvR12.fnt
wps: /.rockbox/wps/Flow.wps
backdrop: /.rockbox/backdrops/Flow.bmp
usb charging: on
cuesheet support: off
listxpos: 5
listypos: 38
listlines: 13
listwidth: 302
start in screen: wps
alarm wakeup screen: wps
iconset: /.rockbox/icons/elisherer.12x13.bmp
viewers iconset: /.rockbox/icons/elisherer.12x13_viewers.bmp


Title: Re: Database - Does it work as badly as I think?
Post by: Mikerman on June 08, 2007, 11:26:56 AM
Hey, folks, I realize this is frustrating, but please keep in mind that these issues appear to be limited to the iPod 80gb player, which is a new port.  Hopefully, and with your assistance, these issues can be improved upon.

I have no such issues on my iRiver iHP-140, and Rockbox actually saves battery power for me, rather than "raping it."
Title: Re: Database - Does it work as badly as I think?
Post by: Llorean on June 08, 2007, 11:31:33 AM
In fact at this point it improves battery life on all non-PortalPlayer targets.
Title: Re: Database - Does it work as badly as I think?
Post by: pixelma on June 08, 2007, 11:41:30 AM
Both of the posted config files look like they contain settings that are not present in an official version...
...
userfont1: /.rockbox/fonts/helvR10.fnt
userfont2: /.rockbox/fonts/helvR12.fnt
userfont3: /.rockbox/fonts/helvR14.fnt
userfont4: /.rockbox/fonts/helvR18.fnt
...
ipod scroll wheel fast threshold in clicks/sec: 135
...
and a few more.

Please, both of you, check with an official current build from the rockbox site - and report back here if you still get the problem, or post in the appropriate thread of the unsupported builds forum if it turns out to be a problem with this build, of course.
Title: Re: Database - Does it work as badly as I think?
Post by: Zsan on June 08, 2007, 01:29:36 PM

Both of the posted config files look like they contain settings that are not present in an official version...
...
userfont1: /.rockbox/fonts/helvR10.fnt
userfont2: /.rockbox/fonts/helvR12.fnt
userfont3: /.rockbox/fonts/helvR14.fnt
userfont4: /.rockbox/fonts/helvR18.fnt
...
ipod scroll wheel fast threshold in clicks/sec: 135
...
and a few more.

Please, both of you, check with an official current build from the rockbox site - and report back here if you still get the problem, or post in the appropriate thread of the unsupported builds forum if it turns out to be a problem with this build, of course.


Nice thinking!

But no. I installed a daily build and enabled dir-cache and tagcache_ram and unfortunately, the problem was there, unaltered. These are the only lines in my cfg file of course. And I rebooted and let it scan, as well.
Title: Re: Database - Does it work as badly as I think?
Post by: bascule on June 08, 2007, 01:56:22 PM
Try this:
Reset settings
Go into settings and set *only* directory cache on and Database to RAM on
Reboot (properly)
Go into the database and see if the problem still recurs.
Title: Re: Database - Does it work as badly as I think?
Post by: adam917 on June 08, 2007, 01:59:03 PM

In fact at this point it improves battery life on all non-PortalPlayer targets.
By how much (percentage), on the H140?
Title: Re: Database - Does it work as badly as I think?
Post by: Llorean on June 08, 2007, 02:03:20 PM
~18% maybe? People who were getting 16 hours on a battery in the retail firmware were getting 19-20 on the same battery under Rockbox (as in, they tested the original firmware, then Rockbox under identical conditions immediately after or vice versa).

Result of course may vary (it may not work linearly, older batteries might get a smaller percentage, or whatnot).
Title: Re: Database - Does it work as badly as I think?
Post by: Zsan on June 08, 2007, 02:54:33 PM

Try this:
Reset settings
Go into settings and set *only* directory cache on and Database to RAM on
Reboot (properly)
Go into the database and see if the problem still recurs.


I'm afraid you didn't read the second page. I installed a clean Rockbox and did just that to it (With a proper reboot) and it still had the exact same problem.
Title: Re: Database - Does it work as badly as I think?
Post by: sadffffff on June 08, 2007, 03:54:35 PM
I have the same problem with a 4gig 1st gen ipod nano, using a current build.

i didn't actually know it was a problem, i just assumed it was supposed to be this way. and i usually use the directory structure to pick my music
Title: Re: Database - Does it work as badly as I think?
Post by: Zsan on June 09, 2007, 03:10:59 PM
I'd like to hear other users about this. Did they try selecting a song from the 'track' list with at least 1000 songs in there? It should take about five seconds, then.
Title: Re: Database - Does it work as badly as I think?
Post by: Vortex on June 09, 2007, 06:18:03 PM
Hi, I'm using a Sansa e280. Running the "stats" plugin tells me:
Code: [Select]
Files: 2171
Music: 1545
Dirs: 219

When I go to "Database"->"Tracks" there is no delay at all. When I select a track from this list, so that a playlists is generated, there is a ~4 second delay while it says "Searching..." and counts down the track count (i.e. it's exactly as you said).

It's pretty bearable delay. There are no notable delays while browsing the Database itself. Everytime you select a subcategory in the Database the "Searching..." window pops up for a split second. That's a bit annoying. Not because of the delay (which is virtually nonexistent) but rather because the flashing popup is somehow irritating.

So, I definitely cannot reproduce the slow browsing problem you are having. Note that the Sansa is a flash based player though and does not have a harddrive.
Title: Re: Database - Does it work as badly as I think?
Post by: |2eM!x on June 09, 2007, 07:14:29 PM

Hi, I'm using a Sansa e280. Running the "stats" plugin tells me:
Code: [Select]
Files: 2171
Music: 1545
Dirs: 219

When I go to "Database"->"Tracks" there is no delay at all. When I select a track from this list, so that a playlists is generated, there is a ~4 second delay while it says "Searching..." and counts down the track count (i.e. it's exactly as you said).

It's pretty bearable delay. There are no notable delays while browsing the Database itself. Everytime you select a subcategory in the Database the "Searching..." window pops up for a split second. That's a bit annoying. Not because of the delay (which is virtually nonexistent) but rather because the flashing popup is somehow irritating.

So, I definitely cannot reproduce the slow browsing problem you are having. Note that the Sansa is a flash based player though and does not have a harddrive.


I've experienced this for a long time.  I think its happening because you have shuffle on and it is creating a new playlist.  Its a pretty annoying thing, in the car sometimes I will pick a new song put the ipod down and it doesnt change songs for 15-20 seconds (Counting down from 862).  If I am right about the playlist thing, is it possible to switch the routines so the song starts playing then the playlist creation is done afterwards?
Title: Re: Database - Does it work as badly as I think?
Post by: Zsan on June 10, 2007, 11:59:27 AM


Hi, I'm using a Sansa e280. Running the "stats" plugin tells me:
Code: [Select]
Files: 2171
Music: 1545
Dirs: 219

When I go to "Database"->"Tracks" there is no delay at all. When I select a track from this list, so that a playlists is generated, there is a ~4 second delay while it says "Searching..." and counts down the track count (i.e. it's exactly as you said).

It's pretty bearable delay. There are no notable delays while browsing the Database itself. Everytime you select a subcategory in the Database the "Searching..." window pops up for a split second. That's a bit annoying. Not because of the delay (which is virtually nonexistent) but rather because the flashing popup is somehow irritating.

So, I definitely cannot reproduce the slow browsing problem you are having. Note that the Sansa is a flash based player though and does not have a harddrive.


I've experienced this for a long time.  I think its happening because you have shuffle on and it is creating a new playlist.  Its a pretty annoying thing, in the car sometimes I will pick a new song put the ipod down and it doesnt change songs for 15-20 seconds (Counting down from 862).  If I am right about the playlist thing, is it possible to switch the routines so the song starts playing then the playlist creation is done afterwards?


Good idea. Perhaps a feature request is in order?
Title: Re: Database - Does it work as badly as I think?
Post by: Vortex on June 10, 2007, 12:45:41 PM
I don't have shuffle on. The playlist creation takes about 5 seconds, and not 15-20 on my Sansa.
Title: Re: Database - Does it work as badly as I think?
Post by: |2eM!x on June 10, 2007, 01:19:03 PM

I don't have shuffle on. The playlist creation takes about 5 seconds, and not 15-20 on my Sansa.


Regardless of shuffle, what its doing is creating a new playlist from all your files in order rather than random.
Title: Re: Database - Does it work as badly as I think?
Post by: rhijaen on July 04, 2007, 09:36:57 AM
I just wanted to add that my 30gig 5.5 iPod has the same problem. It takes almost a minute to load a song from the database>track menu. Sadly, this is keeping me from using it as my primary firmware.

I am using the most current build.
Title: Re: Database - Does it work as badly as I think?
Post by: Llorean on July 04, 2007, 10:55:10 AM
If you want the player to be more responsive, simply use the filetree.
Title: Re: Database - Does it work as badly as I think?
Post by: pixelma on July 04, 2007, 11:20:06 AM
Well if you want to make a playlist with all your songs from the filebrowser too (for example a root.m3u), it will also take a while to collect all of them. This is basically what happens if you select a song from "all tracks" in the database... as stated above.