From bccd2e473f2a0ad71b080043c02f3f9c8f63f91a Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Sat, 12 Aug 2006 21:01:37 +0000 Subject: [PATCH] Improve reload perforamnce by skipping db lookups on forced reload --- src/db-sql.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/db-sql.c b/src/db-sql.c index 043b1fae..203dc024 100644 --- a/src/db-sql.c +++ b/src/db-sql.c @@ -1865,6 +1865,13 @@ MP3FILE *db_sql_fetch_path(char **pe, char *path, int index) { MP3FILE *pmp3=NULL; int err; char *query; + + /* if we are doing a full reload, then it can't be in here. + * besides, we don't have an index anyway, so we don't want to + * do this fetch right now + */ + if((db_sql_in_scan) && (db_sql_reload)) + return NULL; /* not very portable, but works for sqlite */ if(conf_get_int("scanning","case_sensitive",0)) {