cljsrn

https://github.com/drapanjanas/re-natal | https://github.com/drapanjanas/re-natal/wiki/FAQ | https://github.com/condense/mercury-app/wiki | https://github.com/seantempesta/expo-cljs-template/ https://www.npmjs.com/package/create-expo-cljs-app
Eric Ihli 2020-01-17T22:01:36.000800Z

I'm curious if anyone would know of this to be a problem.

(defmacro slurp [file]
  (clojure.core/slurp (io/file (io/resource file))))
(ns ezmonic.e-data
  (:require [cljs.reader :as reader])
  (:require-macros [ezmonic.util :refer [slurp]]))

(defonce data
  (reader/read-string (slurp "number-to-word-tree.edn")))
I'm using that to read a 6MB file. Everything works fine in the emulator. But, when I create a release bundle and install it on my phone, the app freezes for 10 seconds when going to and coming from the background. I would have expected that if this were going to be slow then it would have been slow on app startup and not every time the app is sent to/recovered from the background.

joshmiller 2020-01-17T22:20:26.001600Z

Is it possible that your phone has to do a bunch of work to serialize/deserialize the app’s state to disk on sleep/wake?

joshmiller 2020-01-17T22:21:47.002300Z

My first guess is that something else is going on, but you could always test it out by making a test app that does nothing except that and seeing what happens.