This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-30
Channels
- # announcements (1)
- # asami (21)
- # babashka (10)
- # beginners (123)
- # cider (55)
- # cljfx (9)
- # clojure (21)
- # clojure-europe (25)
- # clojure-nl (4)
- # clojure-uk (6)
- # clojured (1)
- # clojurescript (29)
- # cursive (9)
- # datomic (8)
- # emacs (13)
- # events (1)
- # fulcro (21)
- # graalvm (10)
- # graalvm-mobile (13)
- # jobs (1)
- # luminus (4)
- # malli (7)
- # nrepl (9)
- # off-topic (24)
- # pathom (2)
- # podcasts-discuss (1)
- # reagent (5)
- # releases (1)
- # remote-jobs (3)
- # shadow-cljs (33)
- # tools-deps (60)
- # vim (8)
- # xtdb (1)
Hi everyone. I've got a malli schema of around 1500 sloc, with quite a lot of :multi
schemas. I'm using it for transformation, and to speed up the runtime, I'm using malli/encoder
and malli/decoder
, however creating these transformers takes over a minute with version 0.5.1. I'm not sure how to reason about the complexity there, as it seems like I've got some combinatorial explosion (start-up time increases non-linearly in the size of the schema). Has anyone else run into this sort of thing? Any tips?
EDIT: I don't really see the need for speculative parsing or backtracking, since all the :multi
schemas have discriminators which :dispatch
can use to disambiguate, but there must be a lot of that going on, because plain calls to malli/decode
without the "compiled" versions returned by malli/decoder
take minutes themselves (not using regex schemas at all, either). 😕
(I'm running an Intel(R) Core(TM) i7-10875H)
that's not good @U026F3GM8NA. Could you create an issue out of this with a repro code showing the slowness. Thanks
Will do.
@U055NJ5CC could it be related to into transformer using satisfies? It's notoriously slow and GC intensive