Fork me on GitHub
#hoplon
<
2017-09-22
>
thedavidmeister03:09:37

@alandipert ok, more info, i've refactored the filtered db out of my critical performance path, but i still wouldn't say that equality checking a datascript db is fast

thedavidmeister03:09:21

ah, i tried to upload a profiler screenshot but slack wouldn't let me 😞

thedavidmeister03:09:39

well, it appears to be adding ~13ms to my propagation

thedavidmeister03:09:47

which is happening on keypress

thedavidmeister03:09:09

doesn't leave me much wiggle room before things get janky

thedavidmeister03:09:46

i do like the idea of being able to use something other than = for cell propagation

thedavidmeister03:09:28

in this case i could simply assign a new UUID to the metadata of the datascript conn each time i transact to it, and propagate whenever that changes, rather than having it scan the whole db for equality every time

thedavidmeister03:09:44

it could also potentially open up alternate solutions to https://github.com/hoplon/hoplon/issues/194

thedavidmeister03:09:05

actually, i think in both cases an "unconditional propagation" flag would be enough

thedavidmeister03:09:03

the equality checking is slow for dbs and broken for sorting read/write dom elements, so why not skip it?

thedavidmeister03:09:27

but i suppose that's a special case of the more generalised control you'd get if you could set your own function

dm306:09:36

my idea was to designate a cell as “passive” at use-site

dm306:09:49

or, alternatively, designate a passive cell as active

dm307:09:14

not sure about your db-cell use case though @thedavidmeister - what is the cell graph so that db gets triggered o keypress?

thedavidmeister07:09:46

i transact the user's input from a text field into the db

thedavidmeister07:09:23

but seems like the very first thing javelin does is tries to see if the value of the db is the same as it was before the transaction

thedavidmeister07:09:46

which it never is, but the equality check has to scan through all the datoms in the db to find that out

thedavidmeister07:09:08

based on my rather unscientific profiling this check seems to take ~5-15ms and seems unavoidable because if i try to transact on a timeout or something then i get weird bugs in the UI, like FOUCs, etc.

dm307:09:28

I have a fork of Javelin which I’m working with now on the JVM - lets me experiment a bit

dm307:09:08

currently propagate always check for Clojure equality first

dm307:09:28

when deciding whether to continue propagating the changes down the cell graph

dm307:09:13

so in your case you’d turn it off for the db cell and tell it to propagate always?

dm307:09:46

I mean - on every transact

dm307:09:32

it makes sense unless you often have txs that do not modify datoms