mirror of
https://github.com/penpot/penpot.git
synced 2025-05-23 13:06:14 +02:00
⚡ Improve performance and resolve render issues on exporter.
This commit is contained in:
parent
fd3f304e07
commit
d1e4f0de3e
5 changed files with 71 additions and 23 deletions
|
@ -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)))
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue