Fork me on GitHub
#re-frame
<
2015-12-15
>
Pablo Fernandez10:12:09

@mikethompson: should we refer to the lib as “re-frame” or “Re-frame”?

mikethompson10:12:35

I've always called it re-frame

jstew12:12:53

greetings all. I would like an opinion on something. What do you do with large sets of data that are updated a LOT. I mean like 1 or more times per second and the list is over 1000 items long. updating that in app-db is not performant. pagination is an option but that only solves the rendering part, not the updating part.

jstew12:12:09

It works "ok", surprisingly, but I don't want mediocre performance.

mccraigmccraig12:12:05

@jstew what's the slow bit ?

jstew12:12:45

I have a stream of data coming in over a websocket that could have duplicates, so I have to dedupe and merge into app-db.

jstew12:12:58

de-dupe against my large list.

jstew12:12:32

Hmm... I wonder if I could just use a set.

mccraigmccraig12:12:37

and you can't use a set or map or something ?

jstew12:12:32

I tried a map but that didn't help that much. It could be that my problem is elsewhere. Only presents itself when my data set grows large though.

jstew12:12:00

I'll keep poking around. I'm making sure I didn't miss anything obvious.

mccraigmccraig12:12:58

so your local dataset is 1000s of items, and new items are arriving on the websocket at the rate of ~1/s ... and you need to dedup and add or update the new item in the dataset ?

mccraigmccraig12:12:06

one thought - is yr dataset sorted or something ? re-sorting could be killing your perf ?

jstew12:12:13

It is sorted. Yes.

jstew12:12:23

And has to re-sort when items come in.

mccraigmccraig12:12:19

perhaps you could use a sorted-map-by ?

jstew12:12:48

I bet that would help a lot! I haven't ever used sorted-map-by and didn't even know it was baked into clojure.

mccraigmccraig12:12:30

i've never used it in cljs...

jstew13:12:27

I'll give it a try in a bit. thanks for your help.