This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-12-01
Channels
- # adventofcode (1)
- # bangalore-clj (1)
- # beginners (8)
- # boot (47)
- # cider (6)
- # cljsrn (3)
- # clojure (155)
- # clojure-brasil (2)
- # clojure-china (3)
- # clojure-conj (1)
- # clojure-hk (4)
- # clojure-korea (36)
- # clojure-russia (38)
- # clojure-spec (53)
- # clojure-taiwan (1)
- # clojure-uk (14)
- # clojurescript (70)
- # clojurex (9)
- # component (2)
- # cursive (20)
- # datascript (19)
- # datomic (39)
- # defnpodcast (1)
- # events (5)
- # figwheel (2)
- # hoplon (81)
- # incanter (2)
- # jobs (7)
- # juxt (3)
- # klipse (1)
- # leiningen (1)
- # luminus (15)
- # mount (1)
- # off-topic (21)
- # om (5)
- # om-next (2)
- # onyx (19)
- # pedestal (2)
- # proto-repl (1)
- # proton (5)
- # re-frame (19)
- # reagent (4)
- # rethinkdb (2)
- # ring-swagger (6)
- # rum (13)
- # specter (6)
- # untangled (4)
- # yada (1)
Ok, I have moved the loading of data (transact) to server and then using edn serialization to pass it to server. The advantage is that things are not slow on mobile devices. I am still looking for ways to optimize the loading on server side but it is a better solution for now.
Is there an easier interface for data script, where to the user it looks like inserting maps, and matching "pieces" (or map entries) of maps to query?
@escherize no, nothing I’m aware of
I have datomic data (about 5000+ entities for now). I was passing this from server to client and then using transact to add it to the datascript database on the client. Although it was taking 2-3 seconds on my desktop browser but on mobile devices it was taking more than 10 seconds. Now I am using datascript on the server too. So the data from the datomic is inserted into datascript database and then serialized as edn to the server. On client we just use conn-from-db after deserialization. So, in summary, the data insertion into datascript database is happening on server, then datascript database is serialized to the client as edn, and then data deserialization is happening on the client. Although it is almost the same thing but now the painful part is on the server and so mobile devices are as fast as the desktop browser. I hope it is clear now.
You did all the right things: servers are much more performant than clients, and Clojure datascript is about twice as fast as client datascript