@quest :in [$ ?idc]
should be :in $ ?idc
@souenzzo doh. thank you!
Is this likely to be the fastest way to get data into a datascript db?
(defn data->datoms [ms]
(let [n (atom 0)]
(for [m ms
:let [e (swap! n inc)]
[a v] m
:when (not (nil? v))]
(d/datom e a v))))
(let [datoms (data->datoms ms)
schema {:PK {:db/unique :db.unique/identity}}]
(d/init-db datoms schema)))
I'm trying to work out how to load up a big db in a react-native app. Problem I have is that 60k datoms is slow enough to risk impacting user experience. It takes around 500ms.
I'd like to find a fast way to load which I can break up so it's not all done in one hit. Looking at the implementation I think that's unlikely. The work seems to be in preparing the indexes which doesn't lend itself being broken up.