This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-11
Channels
- # adventofcode (42)
- # asami (13)
- # babashka (40)
- # beginners (25)
- # calva (39)
- # cider (18)
- # circleci (6)
- # cljs-dev (3)
- # clojure (39)
- # clojure-europe (16)
- # clojure-norway (9)
- # clojure-uk (2)
- # clojurescript (42)
- # datalevin (4)
- # datomic (23)
- # fulcro (33)
- # jobs (1)
- # malli (26)
- # minecraft (1)
- # off-topic (88)
- # pedestal (3)
- # polylith (8)
- # re-frame (6)
- # remote-jobs (2)
- # shadow-cljs (20)
- # tools-deps (12)
- # xtdb (5)
@quoll hi, I’m not sure this is the right place to ask, so it’s totally fine if you don’t 😄 I have a trace log where every entry looks kind of like this:
{:args [[:quarter :quarter :nickel]],
:end 1639239215905,
:id :54579,
:inner [],
:meta
{:arglists ([coins]),
:column 1,
:file
"/Users/lukas/Workspace/clojure/omni-trace/src/cyrik/omni_trace/testing_ns.cljc",
:line 9,
:name calc-coin-value,
:ns #namespace [cyrik.omni-trace.testing-ns]},
:name cyrik.omni-trace.testing-ns/calc-coin-value,
:parent :54578,
:return 0.55,
:start 1639239215905}
and i need to throw this into a graph to be able to ask questions like: what was the last call to some name, whats the path from id to the root and so on. this should be performant on the read + the write side.
is asami a good solution for this or should i look into something that is more low level?i’m guessing, my question is less “can it” and more “how much slower” will it be to get asami’s nice api vs doing it on “raw” data. and will asami blow my memory by making copies of everything i pass it?
Well, if you put it into an in-memory database, then yes. It turns it all into triples (entity-attribute-value), and indexes them. If you want to query it in-place, then Meander may be better for you
(You can also save the graph on disk, but that takes longer to index, but it's saved then and queries are fast)
that makes sense, thank you. final question: if a lot of the maps in the trace have the same data, or at least shared parts underneath, will asami also have memory sharing for its own representations or will it have completely new maps for every :args [[:quarter :quarter :nickel]] for example?
ah interesting, so it might be ok if i restructure my traces before passing them in. thank you. i’ll play around with it and see if my memory blows up too badly.
yeah i’ll try that as well, thank you. my problem with to disk is the write speed, since the idea is to use it as an interactive tool in the repl