This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-17
Channels
- # announcements (3)
- # babashka (3)
- # beginners (53)
- # biff (2)
- # calva (16)
- # cider (1)
- # clj-commons (1)
- # clj-kondo (97)
- # clj-on-windows (137)
- # clojure (49)
- # clojure-europe (63)
- # clojure-gamedev (1)
- # clojure-nl (2)
- # clojure-norway (50)
- # clojure-uk (4)
- # clojurescript (36)
- # core-async (28)
- # datomic (32)
- # emacs (22)
- # events (1)
- # graalvm (8)
- # honeysql (6)
- # jobs (2)
- # lambdaisland (5)
- # malli (6)
- # nbb (31)
- # off-topic (171)
- # pathom (14)
- # rdf (2)
- # reitit (4)
- # releases (2)
- # scittle (19)
- # shadow-cljs (46)
- # sql (6)
- # squint (6)
I have a query that the planner resolve correctly but inneficiently. Instead of using an id-resolver + alias it starts with a longer path which results in a few queries instead of one one the db. Is there a way to understand why the planner decided to take the long path to resolve an attribute and to force it to take the short path?
thanks, didn't know about priorities, the issue here though is that both chains are starting with the same resolver
hello Eric, yes, you right, without the weight tracker, Pathom by default will only try to prioritize via explicit declarations, but I see the point in your case, when some options start the same, kinda makes sense that the smaller should go first
that said, are you using latest pathom version? and have you tried turning on the experimental path optimizations? I think in your case there, if you turn them on, you might not have these duplicated subpaths
please let me know if you have a chance to try it, wonder if will affect your planning tree
(to enable experimental optimizations, add to your env: :com.wsscode.pathom3.connect.planner/experimental-branch-optimizations true
)
@U066U8JQJ this is with both optim and weight plugin (graph and chosen path are the same without optim)
optim alone is taking a longer path (and the graph is exactly the same as no optim/no weight plugin)
so I ran into this s.o. question
and feel quite inadequate with my answer. Figured somebody here would know what ::provides
actually does and could provide a better answer .
looking at the source provides
is the output
converted by a function called query->shape-descriptor
which Convert pathom output format into shape descriptor format
`Shape descriptor is a format to describe data. This format optimizes for fast detection of value present given a shape and a value path.`
Ok - guess I feel somewhat better then. That's not too far from the comment I made on that s.o. question. Thank you for the check!
yeah, all good, just add my entry there, hope it can still helps 🙂