   :activation-group-fn activation-group-fn
   :activation-group-sort-fn activation-group-sort-fn)
 
-;(def tuple-session
-;  (cr/mk-session 'libx.perf-tuple
-;   :fact-type-fn :a
-;   :ancestors-fn ancestors-fn
-;   :activation-group-fn activation-group-fn
-;   :activation-group-sort-fn activation-group-sort-fn)
-
 (defn n-facts-session [n]
   (-> tuple-session
+    ;(l/replace-listener)
     (insert (repeatedly n #(vector (guid) :todo/title "foobar")))))
 
 (def session (atom (n-facts-session 10#_0000)))
-;(inspect/explain-activations @session)
+
+;(inspect/inspect @session)
+;(ns-unmap *ns* 'remove-older-one-to-one-facts)
+;; 246ms without, 5000ms with
+
 (defn perf-loop [iters]
   (time
     (dotimes [n iters]

  =>
  (insert-unconditional! [?e :todo/done :tag]))

(cr/defrule remove-older-unique-identity-facts
  {:super true :salience 100}
  [:unique-identity (= ?a1 (:a this)) (= ?t1 (:t this))]
  [?fact2 <- :unique-identity (= ?a1 (:a this)) (= ?t2 (:t this))]
  [:test (> ?t1 ?t2)]
  =>
  (trace (str "SCHEMA MAINT - :unique-identity" ?t1 " is greater than " ?t2))
  (retract! ?fact2))

(def-tuple-rule acc-all-visible
  {:group :report}
  [?count <- (acc/count) :from [:todo/title]]

            ;(l/replace-listener)
            (util/insert-action [(guid) :add-todo-action-2 {:todo/title "ho"}])
            (util/insert-action [(guid) :add-todo-action {:title "hey"}])
            (insert [[1 :done-count 5]
                     [1 :done-count 6]])
            (cr/fire-rules)))))))

(perf-loop 1#_00)

(l/vec-ops @session)
