Improve performance and resolve render issues on exporter.

This commit is contained in:
Andrey Antukh 2022-01-18 16:58:00 +01:00 committed by Andrés Moya
parent fd3f304e07
commit d1e4f0de3e
5 changed files with 71 additions and 23 deletions

View file

@ -20,9 +20,11 @@
[app.main.ui.routes :as rt]
[app.main.worker :as worker]
[app.util.dom :as dom]
[app.util.globals :as glob]
[app.util.i18n :as i18n]
[app.util.theme :as theme]
[beicon.core :as rx]
[cuerdas.core :as str]
[debug]
[potok.core :as ptk]
[rumext.alpha :as mf]))
@ -58,12 +60,18 @@
(rx/take 1)
(rx/map #(rt/init-routes)))))))
(def essential-only?
(let [href (.-href ^js glob/location)]
(str/includes? href "essential=t")))
(defn ^:export init
[]
(worker/init!)
(sentry/init!)
(i18n/init! cf/translations)
(theme/init! cf/themes)
(when-not essential-only?
(worker/init!)
(sentry/init!)
(i18n/init! cf/translations)
(theme/init! cf/themes))
(init-ui)
(st/emit! (initialize)))

View file

@ -153,7 +153,7 @@
(fn []
(->> (rx/zip
(repo/query! :font-variants {:file-id file-id})
(repo/query! :file {:id file-id}))
(repo/query! :trimmed-file {:id file-id :page-id page-id :object-id object-id}))
(rx/subs
(fn [[fonts {:keys [data]}]]
(when (seq fonts)