Fork me on GitHub
Timofey Sitnikov14:01:48

Good Morning all. I am trying to reduce loading times of the . Below is the network time. Why does remote-relay and api take so long? How can I reduce the loading of the remote-relay and the api


Fulcro really has very little to do with that. remote relay is shadow, I think. The API is just hitting your resolvers/code through Ring.

Timofey Sitnikov18:01:44

@U0CKQ19AQ, OK, thank you, I will ask in the shadow-cljs channel. As far as the API, is it in the file src/main/app/server_components/middleware.clj ? In the

(defstate middleware
  (let [defaults-config (:ring.middleware/defaults-config config)
        legal-origins   (get config :legal-origins #{"localhost"})]
    (-> not-found-handler
      (wrap-api "/api")
      ;; If you want to set something like session store, you'd do it against
      ;; the defaults-config here (which comes from an EDN file, so it can't have
      ;; code initialized).
      ;; E.g. (wrap-defaults (assoc-in defaults-config [:session :store] (my-store)))
      (wrap-defaults defaults-config))))