summaryrefslogtreecommitdiff
path: root/apps/tagtree.c
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2022-05-22 20:43:31 +0200
committerSolomon Peachy <pizza@shaftnet.org>2022-08-19 00:27:34 -0400
commit8f6d0efd71862f107d51bd53ec70e1311a54d9d3 (patch)
treeb9d7ec025ee9f4a69ab3a8f8cbf4b9f8bd7dfd32 /apps/tagtree.c
parentcf37676fb100fad9a422159d27ff1d3f260f7d60 (diff)
downloadrockbox-8f6d0efd71862f107d51bd53ec70e1311a54d9d3.tar.gz
rockbox-8f6d0efd71862f107d51bd53ec70e1311a54d9d3.zip
tagtree: Delay showing search progress when ramcache is enabled
The disk doesn't need to spin up when the database is in RAM. Results are usually returned without any noticeable delay, so the splash only creates distraction. Change-Id: I04e5b7d2e00f045143dd86e0561091be3d8f9724
Diffstat (limited to 'apps/tagtree.c')
-rw-r--r--apps/tagtree.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/tagtree.c b/apps/tagtree.c
index 45d2bb991b..2694a764a0 100644
--- a/apps/tagtree.c
+++ b/apps/tagtree.c
@@ -1429,6 +1429,10 @@ static struct tagentry* get_entries(struct tree_context *tc)
1429 return core_get_data(tc->cache.entries_handle); 1429 return core_get_data(tc->cache.entries_handle);
1430} 1430}
1431 1431
1432#ifdef HAVE_TC_RAMCACHE
1433extern struct tagcache_stat tc_stat;
1434#endif
1435
1432static int retrieve_entries(struct tree_context *c, int offset, bool init) 1436static int retrieve_entries(struct tree_context *c, int offset, bool init)
1433{ 1437{
1434 struct tagcache_search tcs; 1438 struct tagcache_search tcs;
@@ -1447,6 +1451,9 @@ static int retrieve_entries(struct tree_context *c, int offset, bool init)
1447 otherwise show it after the normal 1/2 second delay */ 1451 otherwise show it after the normal 1/2 second delay */
1448 show_search_progress( 1452 show_search_progress(
1449#ifdef HAVE_DISK_STORAGE 1453#ifdef HAVE_DISK_STORAGE
1454#ifdef HAVE_TC_RAMCACHE
1455 tc_stat.ramcache ? true :
1456#endif
1450 storage_disk_is_active() 1457 storage_disk_is_active()
1451#else 1458#else
1452 true 1459 true