mirror of
https://github.com/penpot/penpot.git
synced 2025-02-22 23:06:08 -05:00
✨ Add more reasonable default fetch size for db/plan
Making it more general purpose and not only for streaming
This commit is contained in:
parent
349552879e
commit
15f7fac8f4
2 changed files with 3 additions and 3 deletions
|
@ -413,7 +413,7 @@
|
|||
|
||||
(def ^:private default-plan-opts
|
||||
(-> default-opts
|
||||
(assoc :fetch-size 1)
|
||||
(assoc :fetch-size 1000)
|
||||
(assoc :concurrency :read-only)
|
||||
(assoc :cursors :close)
|
||||
(assoc :result-type :forward-only)))
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
(map (partial bfc/decode-file cfg))
|
||||
xf:collect-used-media)
|
||||
|
||||
used (->> (db/plan conn [sql:get-snapshots id])
|
||||
used (->> (db/plan conn [sql:get-snapshots id] {:fetch-size 1})
|
||||
(transduce xform conj #{}))
|
||||
used (into used xf:collect-used-media [file])
|
||||
|
||||
|
@ -164,7 +164,7 @@
|
|||
(mapcat (partial get-used-components deleted-components file-id))
|
||||
|
||||
used-remote
|
||||
(->> (db/plan conn [sql:get-files-for-library file-id])
|
||||
(->> (db/plan conn [sql:get-files-for-library file-id] {:fetch-size 1})
|
||||
(transduce (comp (map (partial bfc/decode-file cfg)) xform) conj #{}))
|
||||
|
||||
used-local
|
||||
|
|
Loading…
Add table
Reference in a new issue