From 08c19d13b38975fd382ff4dbe771e4c36478f3a4 Mon Sep 17 00:00:00 2001 From: Daniel Compton Date: Tue, 19 Dec 2017 21:05:38 +1300 Subject: [PATCH] Hide :sub/create traces for cached subscriptions Fixes #93 --- src/day8/re_frame/trace/view/traces.cljs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/day8/re_frame/trace/view/traces.cljs b/src/day8/re_frame/trace/view/traces.cljs index 75ddec8..f2fde1e 100644 --- a/src/day8/re_frame/trace/view/traces.cljs +++ b/src/day8/re_frame/trace/view/traces.cljs @@ -94,6 +94,10 @@ (set/union % category-keys)))) visible-traces (cond->> @traces + ;; Remove cached subscriptions. Could add this back in as a setting later + ;; but it's pretty low signal/noise 99% of the time. + true (remove (fn [trace] (and (= :sub/create (:op-type trace)) + (get-in trace [:tags :cached?])))) (seq @categories) (filter (fn [trace] (when (contains? @categories (:op-type trace)) trace))) (seq @filter-items) (filter (apply every-pred (map query->fn @filter-items)))) save-query (fn [_]