more datomic perf improvements

This commit is contained in:
BC
2019-01-24 21:56:15 -08:00
parent 78364e6e66
commit 03051ab3c6
2 changed files with 3 additions and 9 deletions

View File

@@ -69,17 +69,12 @@
(defn get-graphql [args]
(let [ids-to-retrieve (->> (raw-graphql-ids args)
(apply-sort args))
matching-count (count ids-to-retrieve)
ids-to-retrieve (apply-pagination args ids-to-retrieve )]
[(graphql-results ids-to-retrieve args)
matching-count]
#_(time (->> (graphql-results ids-to-retrieve args)
(apply-sort args)))))
matching-count]))
(defn count-graphql [args]
(->> (raw-graphql-ids args)
(count)))

View File

@@ -8,9 +8,8 @@
[auto-ap.time :refer [parse normal-date]]))
(defn get-transaction-page [context args value]
(println "TRANSACTION PAGE")
(let [args (assoc args :id (:id context))
[transactions transactions-count] (time (d-transactions/get-graphql (<-graphql args)))
[transactions transactions-count] (d-transactions/get-graphql (<-graphql args))
transactions (map ->graphql transactions)]
[{:transactions transactions
:total transactions-count