datascript

Immutable database and Datalog query engine for Clojure, ClojureScript and JS
isak 2018-10-16T15:32:36.000100Z

anyone had any luck with quickly serializing/deserializing datascript dbs with lots of datoms?

petterik 2018-10-16T19:24:55.000100Z

@isak What have you tried? Have you seen datascript-transit? https://github.com/tonsky/datascript-transit

petterik 2018-10-16T19:26:18.000100Z

Or do you need to incremental updates to the serialization/deserialization?

isak 2018-10-16T19:38:02.000100Z

@petterik I've tried that one (datascript-transit - seems to optimize for size rather than speed), fressian, and just got nippy to work with it. But not happy with the performance yet - takes several seconds to serialize just 30 mb of data. Curious if other people have looked into this and found something they are happy with.

2018-10-16T19:39:37.000100Z

running in which environment, for reference?

isak 2018-10-16T19:39:47.000100Z

clojure on windows

isak 2018-10-16T19:41:29.000100Z

What I did is to serialize everything, not just :eavt datoms, because I think it is too slow to have to sort many times when loading the data

2018-10-16T20:30:42.000100Z

how does datascript store the indices? are they sorted arrays or some other structure? it seems like a bulk-loading API would be useful.

isak 2018-10-16T20:49:06.000100Z

It just uses this structure: https://github.com/tonsky/datascript/blob/master/src/datascript/btset.cljc#L5-L17 The constructors for these are public, so I just used those