enhance(pdf): UI lag for the case of large highlights data

This commit is contained in:
charlie
2023-03-06 17:51:39 +08:00
committed by Tienson Qin
parent e52bda80c9
commit 22dfa621e4
3 changed files with 9 additions and 6 deletions

View File

@@ -1,7 +1,6 @@
(ns frontend.extensions.pdf.assets
(:require [cljs.reader :as reader]
[clojure.string :as string]
[cljs.pprint :as pprint]
[frontend.config :as config]
[frontend.db.model :as db-model]
[frontend.db.utils :as db-utils]
@@ -23,7 +22,8 @@
[medley.core :as medley]
[promesa.core :as p]
[reitit.frontend.easy :as rfe]
[rum.core :as rum]))
[rum.core :as rum]
[fipp.edn :refer [pprint]]))
(defn inflate-asset
[original-path]
@@ -64,7 +64,7 @@
(when hls-file
(let [repo-cur (state/get-current-repo)
repo-dir (config/get-repo-dir repo-cur)
data (with-out-str (pprint/pprint {:highlights highlights :extra extra}))]
data (with-out-str (pprint {:highlights highlights :extra extra}))]
(fs/write-file! repo-cur repo-dir hls-file data {:skip-compare? true}))))
(defn resolve-hls-data-by-key$