From 4906c584615ad4f9a31230a7c54be963f38410e4 Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Thu, 4 Aug 2016 00:17:02 -0500 Subject: [PATCH] Area query builder: Make internal peer list finder an attribute. --- boxtree/area_query.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/boxtree/area_query.py b/boxtree/area_query.py index 6799ce2..7782231 100644 --- a/boxtree/area_query.py +++ b/boxtree/area_query.py @@ -341,6 +341,7 @@ class AreaQueryBuilder(object): """ def __init__(self, context): self.context = context + self.peer_list_finder = PeerListFinder(self.context) # {{{ Kernel generation @@ -405,10 +406,6 @@ class AreaQueryBuilder(object): # }}} - @memoize_method - def get_peer_list_finder(self): - return PeerListFinder(self.context) - def __call__(self, queue, tree, ball_centers, ball_radii, peer_lists=None, wait_for=None): """ @@ -446,8 +443,7 @@ class AreaQueryBuilder(object): max_levels = div_ceil(tree.nlevels, 10) * 10 if peer_lists is None: - peer_list_finder = self.get_peer_list_finder() - peer_lists, evt = peer_list_finder(queue, tree, wait_for=wait_for) + peer_lists, evt = self.peer_list_finder(queue, tree, wait_for=wait_for) wait_for = [evt] if len(peer_lists.peer_list_starts) != tree.nboxes + 1: -- GitLab