Reduce memory usage by avoiding Aeson encode
It was detected that Aeson encoding had high memory usage when the json payload was large, around x60 the payload size. With this change we get around x10 payload size memory usage. The encodeUtf8(when doing a Text -> ByteString with `toS`) function on a large payload also contributed to the high memory usage. Main idea to reduce the memory usage was to let the ByteString coming from the request body go to the database unchanged.
This commit is contained in:
committed by
Steve Chávez
parent
f159233de8
commit
38f3bcf4a6
@@ -6,6 +6,9 @@ extra-deps:
|
||||
- hjsonschema-1.5.0.1
|
||||
- Ranged-sets-0.3.0
|
||||
- protolude-0.2
|
||||
- hasql-1.1
|
||||
- hasql-pool-0.4.3
|
||||
- hasql-transaction-0.5.2
|
||||
ghc-options:
|
||||
postgrest: -O2 -Werror -Wall -fwarn-identities -fno-warn-redundant-constraints
|
||||
nix:
|
||||
|
||||
Reference in New Issue
Block a user