This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-19
Channels
- # announcements (1)
- # asami (75)
- # beginners (16)
- # calva (14)
- # cider (4)
- # clj-kondo (11)
- # cljs-dev (3)
- # clojure (110)
- # clojure-australia (1)
- # clojure-china (1)
- # clojure-europe (38)
- # clojure-hk (1)
- # clojure-indonesia (1)
- # clojure-japan (1)
- # clojure-korea (1)
- # clojure-my (1)
- # clojure-nl (1)
- # clojure-sg (1)
- # clojure-spec (1)
- # clojure-taiwan (1)
- # clojure-uk (2)
- # clojurescript (34)
- # conjure (1)
- # data-science (9)
- # datahike (7)
- # datalevin (1)
- # datascript (1)
- # datomic (5)
- # etaoin (1)
- # fulcro (23)
- # graalvm (50)
- # helix (4)
- # hyperfiddle (8)
- # introduce-yourself (1)
- # jobs (3)
- # kaocha (10)
- # malli (8)
- # mid-cities-meetup (1)
- # minecraft (1)
- # off-topic (13)
- # pathom (14)
- # polylith (38)
- # reitit (1)
- # releases (1)
- # sci (65)
- # shadow-cljs (28)
- # specter (12)
- # tools-deps (8)
- # vim (1)
- # vscode (11)
- # xtdb (31)
To follow up on the last discussion. After fixing my recursion strategy, I've managed to close the gap vs. using pull
v3. The size of the gap varies, but I've seen it go as high as 25% (scales with the size of the result). Though, there can be a reversal when pulling many blocks, since Datascript's pull-many
is simply mapv pull
, but I keep track of visited entities in that case as well.
I'm mainly writing this to note that there is practically no difference between my custom entity building code and just using non-recursive pull
at each iteration. So, it shouldn't be too difficult to write a fairly performant 'flat pull' – just replace the recursive bits in your pull pattern with a custom loop.
I can't see how to improve my code to close the gap. The identical results between using custom and pull
point to the loop, but it's fairly simple and I cannot see a way to improve it. I'm going to declare it good enough 😄