mirror of
https://github.com/penpot/penpot.git
synced 2025-06-06 22:31:38 +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
|
@ -816,8 +816,7 @@
|
|||
{:data (blob/encode (:data file))
|
||||
:features (db/create-array conn "text" (:features file))
|
||||
:revn (:revn file)}
|
||||
{:id (:id file)}
|
||||
{::db/return-keys? false})
|
||||
{:id (:id file)})
|
||||
|
||||
(dissoc file :data)))
|
||||
|
||||
|
@ -900,7 +899,9 @@
|
|||
(conj "styles/v2"))]
|
||||
(db/update! conn :team
|
||||
{:features (db/create-array conn "text" features)}
|
||||
{:id team-id})))))))
|
||||
{:id team-id})
|
||||
|
||||
nil))))))
|
||||
(finally
|
||||
(some-> *semaphore* ps/release!)
|
||||
(let [elapsed (tpoint)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue