mirror of
https://github.com/penpot/penpot.git
synced 2026-08-07 13:29:07 +00:00
WIP arrow api
This commit is contained in:
parent
0d5e1c33c0
commit
d536f4935b
@ -136,7 +136,11 @@
|
|||||||
(swap! sessions dissoc (session-key profile-id)))
|
(swap! sessions dissoc (session-key profile-id)))
|
||||||
|
|
||||||
(defn load-session!
|
(defn load-session!
|
||||||
"Ingest `file-id` into a new in-memory Ladybug database for `profile-id`."
|
"Ingest `file-id` into a new in-memory Ladybug database for `profile-id`.
|
||||||
|
|
||||||
|
Uses Arrow by default (`ingest-on-connection!`). After building the sync
|
||||||
|
index, drops `:nodes`/`:edges` from stored meta so the session does not
|
||||||
|
retain the full projection in heap."
|
||||||
[cfg profile-id file-id]
|
[cfg profile-id file-id]
|
||||||
(unload-session! profile-id)
|
(unload-session! profile-id)
|
||||||
(let [^Database db (Database.)
|
(let [^Database db (Database.)
|
||||||
@ -150,6 +154,7 @@
|
|||||||
:skip-stats? true
|
:skip-stats? true
|
||||||
:skip-validation? true)
|
:skip-validation? true)
|
||||||
index (graph.sync/build-index file-id (:revn meta) (:projection meta))
|
index (graph.sync/build-index file-id (:revn meta) (:projection meta))
|
||||||
|
meta (update meta :projection select-keys [:stats])
|
||||||
session
|
session
|
||||||
(-> {:db db
|
(-> {:db db
|
||||||
:conn conn
|
:conn conn
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user