From 3ce3b102ddd5b663759ed61bd689b7bbda2ceecd Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Sat, 7 Oct 2023 15:10:53 +0200 Subject: Provide "quick" option for loading database into RAM The directory cache and the database's Load to RAM feature each result in a much better user experience. But, when both features are enabled at the same time, it can take a very long time on older players - easily several minutes for larger libraries - until all of the database's dircache references have been updated. Include a 'Quick' option that causes the database to ignore dircache references which can *significantly* reduce disk activity after booting. Change-Id: I25ae779c97d03885b06d5a28d8be55c0d05692a5 --- apps/settings.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'apps/settings.h') diff --git a/apps/settings.h b/apps/settings.h index 09a01b40a1..ce29e020f7 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -136,6 +136,13 @@ enum }; #endif +enum +{ + TAGCACHE_RAM_OFF = 0, + TAGCACHE_RAM_ON = 1, + TAGCACHE_RAM_QUICK = 2 +}; + /* dir filter options */ /* Note: Any new filter modes need to be added before NUM_FILTER_MODES. * Any new rockbox browse filter modes (accessible through the menu) @@ -576,7 +583,7 @@ struct user_settings #endif #ifdef HAVE_TAGCACHE #ifdef HAVE_TC_RAMCACHE - bool tagcache_ram; /* load tagcache to ram? */ + int tagcache_ram; /* load tagcache to ram: 1=on, 2=quick (ignore dircache) */ #endif bool tagcache_autoupdate; /* automatically keep tagcache in sync? */ bool autoresume_enable; /* enable auto-resume feature? */ -- cgit v1.2.3