This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-08
Channels
- # announcements (6)
- # babashka (78)
- # beginners (84)
- # bristol-clojurians (5)
- # calva (50)
- # chlorine-clover (45)
- # cider (14)
- # clj-kondo (18)
- # cljs-dev (2)
- # clojars (2)
- # clojure (387)
- # clojure-android (3)
- # clojure-europe (6)
- # clojure-gamedev (3)
- # clojure-germany (3)
- # clojure-nl (18)
- # clojure-spec (5)
- # clojure-uk (36)
- # clojurescript (8)
- # clojurex (1)
- # conjure (1)
- # css (1)
- # cursive (32)
- # data-science (1)
- # datomic (11)
- # docker (61)
- # duct (17)
- # emacs (7)
- # figwheel-main (3)
- # fulcro (19)
- # jobs-discuss (3)
- # joker (1)
- # leiningen (23)
- # malli (11)
- # mount (6)
- # off-topic (30)
- # pathom (14)
- # pedestal (2)
- # phzr (1)
- # re-frame (11)
- # reagent (3)
- # reitit (5)
- # ring-swagger (3)
- # rum (1)
- # shadow-cljs (113)
- # slack-help (9)
- # spacemacs (16)
- # specter (4)
- # sql (14)
- # vscode (2)
- # windows (3)
- # xtdb (12)
How can I debug the query planner, and what kinds of things confuse it? I am starting to get the query planner taking the vast majority of the query time
query planner you mean using reader3
? or the tracer?
Not sure, but I am trying to debug a long query, so I am requesting a :com.wsscode.pathom/trace along with my request. I am using the following setup
(def server-parser
(p/parallel-parser
{::p/env {::p/reader [p/map-reader
pc/parallel-reader
validate-connect-key-reader
pc/open-ident-reader
p/env-placeholder-reader]
::p/placeholder-prefixes #{">"}}
::p/mutate pc/mutate-async
::p/plugins [(pc/connect-plugin {::pc/register (concat res-i/resolvers engine/resolvers sponsor/resolvers)})
p/error-handler-plugin
p/trace-plugin]}))
And the 'compute-plan' step is coming back as nearly 30 seconds for my particular query
ok, the first guess would be too many edges, 30 seconds is really long time, are you in a case where there are a lot of mutiple input requirements on the resolvers?
So, is it expected that things will start taking a long time if my graph starts sprawling too much?
And yes, there are probably 4+ places in this query where it uses a multiple-input resolver
yeah, the planner on reader2 is quite inefficient around multiple inputs, because it does a cartesian product of branches, that means the number of generated paths multiply quickly when you have many multiple inputs combined
that said, I believe (still need to measure in the real world) that the new planner handles those much better
I suggest you try the alpha releases, and use serial-parser
with reader3
(instead of parallel-reader
)
and please let me know how that goes, I expect the plan computation to be considerably faster
It simply gave me a quick 'not-found' instead
I would be interest to see a reproduction of that, can you simple a demo failing case?