From 733bc7768dce33b83d6c8c95864ddf6b4f35ba5e Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Thu, 11 Apr 2024 15:26:05 +0100 Subject: [PATCH] Do parallel mapping over rows. Not that it will make much difference, but performance on this is currently very poor. --- src/cc/journeyman/walkmap/superstructure.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cc/journeyman/walkmap/superstructure.clj b/src/cc/journeyman/walkmap/superstructure.clj index 5a0f9ba..6f4e5f3 100644 --- a/src/cc/journeyman/walkmap/superstructure.clj +++ b/src/cc/journeyman/walkmap/superstructure.clj @@ -128,7 +128,7 @@ ([o] (in-store-find-objects o {})) ([o s] - (l/debug "Finding objects in:" o) + (when (map? o) (l/debug "Finding objects in:" o)) (cond (set? o) s ;; TODO: should I search in sets for objects when storing? (map? o) (if (:walkmap.id/id o) @@ -274,4 +274,4 @@ ([^IPersistentMap target ^IPersistentMap s] (neighbour-ids target identity s)) ([^IPersistentMap target ^IFn filter-fn ^IPersistentMap s] - (map :walkmap.id/id (neighbours target filter-fn s)))) + (pmap :walkmap.id/id (neighbours target filter-fn s))))