re-frame

https://github.com/Day8/re-frame/blob/master/docs/README.md https://github.com/Day8/re-frame/blob/master/docs/External-Resources.md
dntn 2020-12-19T01:19:59.494300Z

Are there any known issues, best practices, or limitations when dealing with large data structures in the app-db? I haven't found any other discussions around this. For example, I have an application which can load up to ~200MB JSON document from a web service that contains metadata about things that I'd like to allow users to explore in the re-frame app. Should I preprocess this response before putting it into the app-db? Avoid too many subscriptions with the response's layer 2 subscription as input?

2020-12-19T17:42:33.497200Z

Have you noticed any performance issues? In my experience you can deal with problems like these as they pop up since moving logic from subscriptions to some "preprocessing" step in an event tends to not be too terrible

dntn 2020-12-21T15:26:20.499500Z

Yeah, a performance issue is what caused us to look into it. The user's browser tab with the application crashed due to too much memory usage. > moving logic from subscriptions to some "preprocessing" step in an event tends to not be too terrible Yeah, we went ahead and did this since it seemed like it allowed the memory usage to go down (the peak in both cases were the same, but after garbage collection, it was lower when storing the preprocessed instead)

lilactown 2020-12-22T18:43:44.020800Z

hash maps get less performant the bigger they grow. you might consider using a data structure that doesn't involve structural sharing (e.g. a plain JS object) if you're running into performance problems

lilactown 2020-12-22T18:44:48.021Z

especially if you're not modifying the metadata in the app, using immutable data is a bit of a waste.

lilactown 2020-12-22T18:46:24.021200Z

ultimately you'll want to profile your app and see where the performance is being bottlenecked

Tamas 2020-12-19T11:31:57.495900Z

Hi, is there a template for re-frame apps similar to https://github.com/day8/re-frame-template but if you don't want to use Leiningen?

solf 2020-12-21T00:51:39.497600Z

Actually the template you linked doesn't use leiningen, unless I'm reading the README wrong

solf 2020-12-21T00:51:54.497800Z

It says it includes:

re-frame
shadow-cljs
cljs-devtools

✅ 1
solf 2020-12-21T00:55:45.498Z

The readme does say to use lein to install the template, but you can avoid it by using https://github.com/seancorfield/clj-new if you use tool deps instead

Tamas 2020-12-21T04:53:58.498700Z

Thanks for the responses!

Tamas 2020-12-21T04:56:06.498900Z

@dromar56 yes, you can generate the template using clj-new but you end up with a leiningen project, just scroll down in that readme and see how you would Run the application. lein deps, lein watch etc.

Tamas 2020-12-21T04:58:07.499100Z

@claudius.nicolae I love that animated gif in your README https://github.com/tape-framework/doc 😄

😀 1
clyfe 2020-12-19T12:14:03.496100Z

https://github.com/tape-framework/clj-template but it's not plain re-frame and it's pre.alpha

clyfe 2020-12-19T12:14:18.496500Z

Tutorial here: https://github.com/tape-framework/doc/blob/master/docs/Tutorial.md