Fork me on GitHub
#cljsrn
<
2021-06-10
>
pez12:06:36

Anyone know of some nice resources on performance profiling a cljsrn app? I see huge slowdowns on Android when upgrading an app from RN 0.61 to 0.64, and I’m out of ideas about how to pinpoint where it happens.

raspasov14:06:56

Are you sure that upgrading RN was the only change that happened? It could very well be, or it could be something else. Last time this happened to me (on iOS), the culprit was DataScript and my lack of knowledge of how to use it properly. It took me 2-3 days to figure out where the performance problem was (mainly via guessing).

pez14:06:28

The change involves an upgrade of React Navigation as well. Otherwise just the necessary bumps and changes for the upgrades.

pez14:06:25

In dev the slowdown is something like 100X, for release builds maybe 10X (very unscientific measures, just the gut feeling).

pez14:06:59

Could still be a bad usage of re-frame or something else, of course, but that gets exposed only on Android and together with something between RN 61 and 64, or between react navigation 3 and 5.

raspasov12:06:42

No personal experience with React Navigation but it would be suspect also for me. I think every major React Navigation version was quite a big change.

kennytilton14:06:30

Trying to evaluate re-natal, I ran into a problem and thought I would check my dependencies more closely. The RN CLI dependency says "react-native-cli >=0.1.7 (install with npm install -g react-native-cli)". Unfortunately, RN doc now warns "If you previously installed a global react-native-cli package, please remove it as it may cause unexpected issues. Instead we use npx on each command. Which way do we go? Will re-natal be OK with the npx approach and an uninstall of reactive-native-cli?

raspasov14:06:26

Last I checked re-natal does not seem to be maintained anymore. shadow-cljs, figwheel-main, and krell are all viable I think at this point for React Native + CLJS.

👆 2
raspasov14:06:16

(I personally use figwheel-main)

kennytilton15:06:53

Thx. I saw David giving a big shout-out to re-natal on the Krell page and thought I would give it a whirl. Up next: figwheel-main.

raspasov15:06:20

Yes… I believe it was more of a historical reference but I see how it can be confusing 🙂

raspasov15:06:42

https://figwheel.org/docs/react-native.html Last I tried this tutorial should be able to get you going to a dev setup.

kennytilton22:06:22

Yes, that ^^ worked great. And rn-rf-shadow also came up OK, which is clutch for a re-frame effort we have in mind. Thx!

👍 2
kennytilton22:06:51

I just wish Clojure/CLJS had more build approaches. I know of six, but seven is the lucky number. 🙂 Effectively, the language was mature and stable almost at birth but in fifteen years we have not figured out how to run it. :face_palm:

raspasov14:06:09

More build approaches? figwheel-main and shadow-cljs are not good enough? 🙂 Plain setup via deps.edn also works, but comes with less bells and whistles.

kennytilton12:06:54

How did you forget Boot?! 🙂

👌 3