Fork me on GitHub
Oliver George00:11:42

Are there any rules of thumb about how many facts datascript can comfortably support before performance gets tricky. I'm thinking about suitability for use with re-frame for a webapp and re-natal mobile app.


I would be curious to know too.


I think you'd probably run into memory issues before datascript performance became an issue


Doubt it's a concern in most typical web/mobile apps, if you would be storing everything in memory anyway

Oliver George22:11:49

I'm thinking 10k facts is likely. That'd save lots of network traffic for looks ups to essentially static data. Can't see getting to 100k facts.

Oliver George22:11:51

Newbie observation: When I put a datascript db inside by re-frame.db/app-db and use their debug interceptor I get an error. The error occurs when tries to compare the before and after db.

Clojure 1.10.0-beta8
user=> (require '
user=> (require 'datascript.core)
    [{:a 1}]))
Execution error (ClassCastException) at user/eval5 (REPL:1).
datascript.db.Datom cannot be cast to java.util.Map$Entry

Oliver George22:11:50

I realise diffing the db is silly but it does seem like a bug.

Oliver George22:11:57

Is this worth logging as a bug?