This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-30
Channels
- # admin-announcements (42)
- # alda (8)
- # aws (10)
- # beginners (22)
- # boot (165)
- # bristol-clojurians (1)
- # cider (6)
- # clara (21)
- # cljs-dev (23)
- # clojure (74)
- # clojure-dev (8)
- # clojure-russia (41)
- # clojurescript (180)
- # core-async (11)
- # cursive (26)
- # datascript (2)
- # datavis (7)
- # datomic (29)
- # editors (1)
- # hoplon (7)
- # jobs (3)
- # ldnclj (4)
- # lein-figwheel (47)
- # leiningen (2)
- # mount (26)
- # off-topic (3)
- # om (163)
- # onyx (56)
- # proton (4)
- # reagent (6)
- # remote-jobs (1)
- # ring-swagger (4)
- # spacemacs (9)
@ryanbrush: question for you -- we have rules which are generated dynamically, and we were noticing that our runs with caching turned on were missing the cache. Turns out it was due to ordering.
Honestly, this might be an instance of "not clara's responsibility" -- I think we're going to wind up managing our own cache using an LRU or TTL cache
@devn I'm open to the idea of using a set to improve cache hits. Come to think of it, if the code that generates rules produces a set (rather than a list) that is passed to mk-session, then that might actually trigger a cache hit by itself. We should be able to think of mk-session as a memoized function. If passing a set of rules into mk-session doesn't hit the cache then we could probably change that.
@devn However, managing your own cache might be a better idea, anyway, since putting all rules into a set (or doing a deep comparison in a sequence) could get expensive for a lot of rules. You could probably do something more efficient in user code if you know that things changed or didn't.
i guess my thinking was that it was a little subtle why at first. i opened up yourkit to figure out what was slow, found myself in mk-session, beta and alpha creation, yadda yadda, noticed a lot of DynamicClassLoader business, saw a bunch of eval's which i believe are the generate LHS and RHS fns
finally noticed we were just getting cache misses, diff'd the generated rules, noticed the order issue, yadda yadda
i couldn't really think of a good reason why clara couldn't just make the decision to take whatever collection is passed to mk-session and make it a set, or if someone really wanted duplicates, (sort-by hash [...])
or something
Yeah, that's fair. Just want to understand any performance implications there might be but I think we can do that.
@ryanbrush: One More Thing™ -- Do you have any thoughts on analyzing/visualizing the time-complexity of build-network provided a set of rules?
General question is: How much does the design of the rules being added to a session effect the performance of build-network? For instance, a really shallow logic graph vs one with a lot of depth.
Wondering aloud if there's any potentially actionable information about the complexity of the network that would be useful to someone building an expert system.
@devn good question, but probably not one that I can answer on my mobile right now. ;) I'll post something more thoughtful when I get the chance.
@ryanbrush: ha, no worries! @enn and I were working together today and I popped open Slack and realized I asked you a question about Clara at 10PM on Christmas Eve. You owe me nothing, and I'm very grateful for all of your help.