From a8c9cde8fca848fe49d911134e2b84e453eb7fe2 Mon Sep 17 00:00:00 2001 From: Mikhail Atuchin Date: Wed, 6 Mar 2024 15:53:33 +0700 Subject: [PATCH] Optimize search time --- src/core/study_processor.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/study_processor.ts b/src/core/study_processor.ts index 8d00b8b1..bba85236 100644 --- a/src/core/study_processor.ts +++ b/src/core/study_processor.ts @@ -65,6 +65,8 @@ export class StudyFilter { } matches(s: ProcessedStudy): boolean { + if (s.getPriority() < this.minPriority) return false; + if (s.studyDetails.isOutdated() && !this.includeOutdated) return false; const regex = this.searchRegexp; if (regex !== undefined) { let found = false; @@ -80,8 +82,6 @@ export class StudyFilter { if (!found) return false; } - if (s.getPriority() < this.minPriority) return false; - if (s.studyDetails.isOutdated() && !this.includeOutdated) return false; return true; } }