Fork me on GitHub
#datascript
<
2016-12-06
>
leov12:12:06

@rauh can you please expand your idea?

leov12:12:49

@tawus so you basically had edn values over websocket before your optimization, and edn values over websocket after that. sorry that I don't get it, but why it started to work faster?

leov12:12:40

is it that datomic tree datastructure was serialized instead of json-like values and that made it faster, right?

danielstockton14:12:57

Encoding the path as a single int with a level shift, is this a well known technique? https://github.com/tonsky/datascript/blob/master/src/datascript/btset.cljc#L20

danielstockton14:12:43

Can anyone point me to any reading?

danielstockton15:12:00

Presumably it's a performance optimization, what specifically does it help with?

Niki16:12:02

I probably learned that from Clojure’s hash map implementation

danielstockton16:12:19

I see, I found some explanation here: http://blog.higher-order.net/2009/09/08/understanding-clojures-persistenthashmap-deftwice.html I'll see if I can work out what the benefit is

rauh17:12:16

@leov I wanna try out my idea some more, then I'll put some code up at some point. Maybe a gist or possibly even a full library. Right now it seems to work rather nicely and I'm happy

rauh21:12:14

So I only had 2 queries in my app and otherwise mostly just did raw index access. Once I have an entry point my react components just walk along the graph using entities. I just removed the query engine from datascript and it shaved off 22kb (gzipped) and ~130k minified. Now datascript is really lightweight and still provides tons of functionality

dhucerbin21:12:31

Hi, I’m experimenting with datascript and reactive streams. It’s fun but could you point me to some nice prior art? I know posh and I’m dissecting it’s sources but I would like go for streams instead of atoms and I’m wondering if someone took this aproach? Could be datascript or datomic.