From 48550235d51a92805af51d6e12484f60435a02b2 Mon Sep 17 00:00:00 2001 From: Aaron Oneal Date: Wed, 6 Sep 2017 20:49:47 -0700 Subject: [PATCH] Fix slow content scans. The check for unsupported content was reversed which was causing files to be checked against every database. Correcting this improves performance drastically. This appears to have been broken since at least commit #fc1f2cdcf. --- tasks/task_database.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/task_database.c b/tasks/task_database.c index 1a28754fb6..c3661f965c 100644 --- a/tasks/task_database.c +++ b/tasks/task_database.c @@ -414,7 +414,7 @@ static int task_database_iterate_crc_lookup( unsupported_content = core_info_unsupported_content_path(name); /* don't scan files that can't be in this database */ - if(!db_supports_content && !unsupported_content) + if(!db_supports_content || unsupported_content) return database_info_list_iterate_next(db_state); snprintf(query, sizeof(query),