Add performance improvements to file thumbnails

Mainly addresing unnecesary object transmission. The new code strips
unnecesary data to be transferred from back to front.

Additionally it removes some legacy code and simplifies other
parts of code.
This commit is contained in:
Andrey Antukh
2022-03-21 09:25:19 +01:00
committed by Alonso Torres
parent 27c8f883ff
commit b91c42e186
6 changed files with 72 additions and 118 deletions

View File

@@ -53,6 +53,7 @@
(s/def ::hide-fill-on-export boolean?)
(s/def ::file-thumbnail boolean?)
(s/def ::masked-group? boolean?)
(s/def ::font-family string?)
(s/def ::font-size ::us/safe-integer)
@@ -301,7 +302,8 @@
(defmethod shape-spec :frame [_]
(s/and ::shape-attrs
(s/keys :opt-un [::hide-fill-on-export])))
(s/keys :opt-un [::file-thumbnail
::hide-fill-on-export])))
(s/def ::shape
(s/and (s/multi-spec shape-spec :type)