From c0770988c673987eadf98d98cbb3bfe0aeb1ca9b Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Tue, 31 Dec 2013 17:43:47 +0000 Subject: [PATCH] 7340: Performance improvement in ancestor filter --- src/Filters/Rules/Person/_IsAncestorOf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Filters/Rules/Person/_IsAncestorOf.py b/src/Filters/Rules/Person/_IsAncestorOf.py index 4caff6817..394d66d71 100644 --- a/src/Filters/Rules/Person/_IsAncestorOf.py +++ b/src/Filters/Rules/Person/_IsAncestorOf.py @@ -70,6 +70,8 @@ class IsAncestorOf(Rule): def init_ancestor_list(self, db, person,first): if not person: return + if person.handle in self.map: + return if not first: self.map.add(person.handle)