graphql-engine/server
Matthew Pickering 35b81f39e9 Memory performance improvements from Cherre (#518)
* Stop shutdown handler retaining the whole serveCtx

This might look like quite a strange way to write the function but it's
the only way I could get GHC to not capture `serveCtx` in the shutdown
handler.

Fixes the metadata issue in #344

* Force argumentNames

The arguments list is often empty so we end up with a lot of duplicate
thunks if this value is not forced.

* Increase sharing in nullableType and nonNullableType

The previous definitions would lead to increased allocation as it would
destory any previously created sharing. The new definition only allocate
a fresh constructor if the value is changed.

* Add memoization for field parsers

It was observed in #344 that many parsers were not being memoised which
led to an increase in memory usage. This patch generalisation memoisation so
that it works for FieldParsers as well as normal Parsers.

There can still be substantial improvement made by also memoising
InputFieldParsers but that is left for future work.

Co-authored-by: Antoine Leblanc <antoine@hasura.io>

* [automated] stylish-haskell commit

* changelog

Co-authored-by: Phil Freeman <paf31@cantab.net>
Co-authored-by: Antoine Leblanc <antoine@hasura.io>
Co-authored-by: Stylish Haskell Bot <stylish-haskell@users.noreply.github.com>
Co-authored-by: Phil Freeman <phil@hasura.io>
GitOrigin-RevId: 36255f77a47cf283ea61df9d6a4f9138d4e5834c
2021-02-12 01:34:56 +00:00
..
bench-wrk server: make more use of hlint (#6059) 2020-10-28 16:40:33 +00:00
packaging Switch from stack to cabal-install for building server code (close #3280) (#3558) 2020-01-17 16:07:15 -06:00
src-bench-cache server: make more use of hlint (#6059) 2020-10-28 16:40:33 +00:00
src-exec Memory performance improvements from Cherre (#518) 2021-02-12 01:34:56 +00:00
src-lib Memory performance improvements from Cherre (#518) 2021-02-12 01:34:56 +00:00
src-rsr tag release v1.4.0-alpha.1 2021-01-29 12:31:13 +00:00
src-test pass gql requests into auth webhook POST body (#149) 2021-02-03 07:11:39 +00:00
tests-py server: support tracking of custom functions which return single row 2021-02-03 14:07:30 +00:00
.dockerignore update packages (#251) 2018-08-08 13:10:13 +05:30
.gitignore Merge oss/master onto mono/main 2020-11-12 22:37:19 +05:30
.hlint.yaml server: clean MaybeT usage, and introduce new hlint rules 2021-01-19 13:38:42 +00:00
.stylish-haskell.yaml ci: run stylish haskell on all incoming PRs 2021-01-21 23:37:26 +00:00
cabal.project update pg-client-hs to revert buffer shrinking 2021-01-29 12:04:39 +00:00
cabal.project.ci update resource limits on circleci [force ci] 2021-01-29 14:36:07 +00:00
cabal.project.dev server: Bump GHC version to 8.10.2 (#5659) 2020-08-26 23:16:23 -05:00
cabal.project.dev-sh dev.sh: restore code coverage functionality 2020-01-23 18:35:18 -05:00
cabal.project.dev-sh.freeze dev.sh: restore code coverage functionality 2020-01-23 18:35:18 -05:00
cabal.project.dev-sh.local ci: activate -Werror in dev.sh config 2021-01-08 21:32:34 +00:00
cabal.project.freeze Merge pull request #113 from hasura/karthikeyan/remote-schema-permissions 2020-12-21 09:12:35 +00:00
commit_diff.txt Rewrite GraphQL schema generation and query parsing (close #2801) (#4111) 2020-08-21 12:27:01 -05:00
CONTRIBUTING.md Merge pull request #223 from hasura/jberryman/5863-prep-refactoring 2020-12-20 06:53:38 +00:00
graphql-engine.cabal server: multitenant metadata storage 2021-02-11 17:55:21 +00:00
Makefile server: hasura on PG v13 (#125) 2020-12-01 12:22:42 +00:00
sample.hie.yaml Merge oss/master onto mono/main 2020-11-12 22:37:19 +05:30
Setup.hs move raven into graphql-engine repo 2018-06-28 00:32:00 +05:30
STYLE.md server: Add a Haskell style guide (#2175) 2020-04-08 02:31:30 -05:00