-
Notifications
You must be signed in to change notification settings - Fork 155
feat: improve memory management & request deduplication #1336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jensneuse
wants to merge
45
commits into
master
Choose a base branch
from
feat/improve-memory-usage-with-arenas
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,214
−2,060
Open
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
72ca42a
feat: add astjson & ArenaResolveGraphQLResponse
jensneuse 20bf416
chore: refactor & simplify DataSource interface
jensneuse 3142c90
chore: implement weak arena pool
jensneuse 1c9b877
chore: default buffer size
jensneuse 112171e
chore: move single flight into loader
jensneuse 7a777ea
chore: add http client buffer size hint
jensneuse c41b4b6
chore: selectItems on arena
jensneuse 3e1454f
chore: refactor arena pool into separate file
jensneuse a41ec06
refactor: update buffer size in HTTP client and enhance arena pool si…
jensneuse ced27f3
chore: add second arena for response buffer
jensneuse 67db907
chore: add headers to DataSource args, add HeadersForSubgraphRequest …
jensneuse 26f22b3
chore: rename HeadersForSubgraphRequest to SubgraphHeadersBuilder
jensneuse 4392770
chore: fix bug
jensneuse 94f3d27
chore: use are to execute subscription updates
jensneuse a1ed93e
Merge branch 'wg-master' into feat/improve-memory-usage-with-arenas
jensneuse e7407d1
chore: merge main
jensneuse 60b5c3b
chore: update deps
jensneuse 3fb0272
chore: add comments
jensneuse bb33b4b
chore: set content length correctly
jensneuse bb31735
chore: fix bench
jensneuse ce83a7b
chore: fix lint
jensneuse 5cfd72d
chore: fix lint
jensneuse 4d4b4c5
chore: cleanup & comments
jensneuse 48de651
chore: refactor
jensneuse 6653948
chore: refactor & comments
jensneuse 6cbfed0
chore: remove unused ParallelListItemFetch
jensneuse daa18e8
chore: simplify batchStats logic
jensneuse 2003186
chore: simplify
jensneuse 0c0e1ce
chore: add tools pool for loadBatchEntityFetch
jensneuse 8e3d0df
chore: improved cleanup
jensneuse f3f2a8e
chore: refactor, docs, inbound sf
jensneuse cd59d03
chore: refactor
jensneuse c579f48
chore: fmt
jensneuse 319126c
chore: fix test
jensneuse 0bf8fb3
chore: refactor
jensneuse 1ae36b4
chore: refactor
jensneuse 57e688c
chore: allow single flight in loader for sub Queries, even if root op…
jensneuse 8f3e30f
chore: improve arena pool & add tests
jensneuse 3df9e01
chore: use arena in Walker
jensneuse aa789e0
chore: fix lint
jensneuse 789f125
Merge branch 'wg-master' into feat/improve-memory-usage-with-arenas
jensneuse d5e60ba
Merge branch 'wg-master' into feat/improve-memory-usage-with-arenas
jensneuse d8f04ca
chore: refactor arena handling
jensneuse dd00412
chore: use sync.Map, cleanup
jensneuse 57b8680
Merge branch 'wg-master' into feat/improve-memory-usage-with-arenas
jensneuse File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does the magic number
64come from?Does the arena being initilazied here and not in the
NewWalkerbecause of cases when we create a walker but never "walk" it? If it is not the case we could eliminate branching by moving initialization to theNewWalkerThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We very rarely have situations where subgraph responses are smaller, so it's less buffer grow operations until we find the right buffer size, at the same time it's still small enough so that we're not over-allocating