diff options
author | Christian Soffke <christian.soffke@gmail.com> | 2022-05-22 20:43:31 +0200 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2022-08-19 00:27:34 -0400 |
commit | 8f6d0efd71862f107d51bd53ec70e1311a54d9d3 (patch) | |
tree | b9d7ec025ee9f4a69ab3a8f8cbf4b9f8bd7dfd32 | |
parent | cf37676fb100fad9a422159d27ff1d3f260f7d60 (diff) | |
download | rockbox-8f6d0efd71.tar.gz rockbox-8f6d0efd71.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
-rw-r--r-- | apps/tagcache.c | 2 | ||||
-rw-r--r-- | apps/tagtree.c | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c index 436d85812b..8db1569379 100644 --- a/apps/tagcache.c +++ b/apps/tagcache.c @@ -170,7 +170,7 @@ static const char * const tag_type_str[] = { #endif /* ndef LOGF_ENABLE */ /* Status information of the tagcache. */ -static struct tagcache_stat tc_stat; +struct tagcache_stat tc_stat; /* Queue commands. */ enum tagcache_queue { 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) return core_get_data(tc->cache.entries_handle); } +#ifdef HAVE_TC_RAMCACHE +extern struct tagcache_stat tc_stat; +#endif + static int retrieve_entries(struct tree_context *c, int offset, bool init) { struct tagcache_search tcs; @@ -1447,6 +1451,9 @@ static int retrieve_entries(struct tree_context *c, int offset, bool init) otherwise show it after the normal 1/2 second delay */ show_search_progress( #ifdef HAVE_DISK_STORAGE +#ifdef HAVE_TC_RAMCACHE + tc_stat.ramcache ? true : +#endif storage_disk_is_active() #else true |