mirror of
https://github.com/penpot/penpot.git
synced 2025-06-05 10:31:40 +02:00
✨ Improve the db api efficiency
Mainly setup proper defaults and reduce unnecesary allocations on every db api call.
This commit is contained in:
parent
93bf8c1478
commit
746d898245
28 changed files with 228 additions and 186 deletions
|
@ -249,8 +249,7 @@
|
|||
(blob/encode))]
|
||||
(db/update! conn :file
|
||||
{:data data}
|
||||
{:id file-id}
|
||||
{::db/return-keys? false}))
|
||||
{:id file-id}))
|
||||
|
||||
(count unused))))
|
||||
|
||||
|
@ -315,7 +314,6 @@
|
|||
;; Mark file as trimmed
|
||||
(db/update! conn :file
|
||||
{:has-media-trimmed true}
|
||||
{:id id}
|
||||
{::db/return-keys? false})
|
||||
{:id id})
|
||||
|
||||
(feat.fdata/persist-pointers! cfg id))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue