This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-24
Channels
- # arachne (1)
- # aws (1)
- # beginners (43)
- # boot (67)
- # cider (7)
- # cljs-dev (14)
- # cljsjs (6)
- # clojure (215)
- # clojure-czech (2)
- # clojure-dev (12)
- # clojure-dusseldorf (2)
- # clojure-italy (1)
- # clojure-russia (22)
- # clojure-spec (2)
- # clojure-uk (33)
- # clojurescript (85)
- # cryogen (2)
- # cursive (1)
- # datascript (22)
- # datomic (18)
- # dirac (8)
- # hoplon (9)
- # klipse (1)
- # lein-figwheel (5)
- # leiningen (126)
- # off-topic (1)
- # om (57)
- # onyx (159)
- # pedestal (33)
- # planck (2)
- # re-frame (52)
- # reagent (3)
- # ring (2)
- # ring-swagger (16)
- # test-check (12)
- # testing (5)
- # untangled (86)
- # vim (6)
I'd like to use Datascript for an offline-only web-app, where my plan is to generate a Datascript DB from Clojure first and then serializing it so that it's available in the CLJS part of the app
however I realized that the amount of datoms I would have is quite large, probably to the tune of 100k
so I was wondering how many datoms I should expect Datascript to handle without running into performance issues
the data is basically a list of records that I want to then display based on some filters which are constructed via the UI
it depends on: - user's device - complexity of the queries (sometimes it is much more efficient to use indexes directly, but it might not be enough)
it's hard to say - you're better off generating the data manually (e.g. using test.check) and looking at it
also your domain might allow you to split data set into several databases, which might give you some performance boost too
@luxbock you can read e.g. here https://github.com/tonsky/datascript/issues/130#issuecomment-159602488
> DataScript is in different category, so expect different tradeoffs: query speed depends on the size of result set, you need to sort clasuses to have smaller joins, accessing entity properties is not free given its id, etc. As a benefit, you gain ability to query dataset for different projections, forward and reverse reference lookups, joins between different sets, etc. And direct index lookup (datascript.core/datoms) is still fast and comparable to lookup in a map (at least comparable, think binary lookup vs hashtable lookup, logarithm vs constant). Queries do much more than that.
direct index lookups are still fast no matter what (they are lazy walks over existing data structures, they don’t create any new arrays/data structures)
currently, DataScript can’t work with parts of the index stored on a disk/local storage/.... It must all be in memory