This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-12
Channels
- # aleph (3)
- # announcements (7)
- # babashka (22)
- # beginners (44)
- # calva (19)
- # chlorine-clover (1)
- # cider (20)
- # clj-kondo (55)
- # clojure (100)
- # clojure-austin (9)
- # clojure-europe (19)
- # clojure-italy (19)
- # clojure-nl (13)
- # clojure-portugal (2)
- # clojure-uk (7)
- # clojurescript (38)
- # community-development (3)
- # conjure (2)
- # cryogen (57)
- # cursive (6)
- # datalog (3)
- # datomic (24)
- # emacs (17)
- # exercism (8)
- # fulcro (3)
- # holy-lambda (8)
- # jobs (6)
- # jobs-discuss (9)
- # joker (3)
- # lambdaisland (5)
- # leiningen (5)
- # music (9)
- # nextjournal (1)
- # nrepl (2)
- # off-topic (9)
- # other-languages (4)
- # pathom (6)
- # polylith (23)
- # re-frame (5)
- # reagent (5)
- # remote-jobs (1)
- # reveal (1)
- # shadow-cljs (3)
- # tools-build (1)
- # tools-deps (3)
- # xtdb (2)
Does anyone know if there’s a performance trade-off between the following two resolvers, in Pathom3?
(pco/defresolver user-ids-by-group-resolver
[{db :db}
{group-id :group/id}]
{::pco/output [:group.user/ids]}
{:group.user/ids (expensive-db-query group-id)})
(pco/defresolver user-ids-by-group-resolver
[{db :db}
{group-id :group/id}]
{:group.user/ids (expensive-db-query group-id)})
In the former, ::pco/output
can signal the return value of the resolver without invoking expensive-db-query
. Or does macro magic make the two queries identical?
the output will be computed at code read time in this case, so if the result is the same, the runtime is also the same