Use GridFS/DEFAULT_CHUNKSIZE instead of our own default
Ruby driver uses 2 MB default chunk size, Java driver uses 256K. Lets use what the Java driver does.
This commit is contained in:
parent
1187719ac1
commit
a3d6a66eb1
1 changed files with 1 additions and 3 deletions
|
|
@ -17,8 +17,6 @@
|
|||
}
|
||||
byte-array-type (class (make-array Byte/TYPE 0)))
|
||||
|
||||
(def ^:dynamic *chunk-size* (* 2 1024 1024))
|
||||
|
||||
;; ...
|
||||
|
||||
|
||||
|
|
@ -70,7 +68,7 @@
|
|||
(defmacro store
|
||||
[^GridFSInputFile input & body]
|
||||
`(let [^GridFSInputFile f# (doto ~input ~@body)]
|
||||
(.save f# *chunk-size*)
|
||||
(.save f# GridFS/DEFAULT_CHUNKSIZE)
|
||||
(from-db-object f# true)))
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue