Really slow for huge list of objects
See original GitHub issuetype FooBar {
# some more flat fields
}
type Bar {
n: Int!
sub: FooBar!
}
type Foo {
foo: [Bar!]!
}
We have a structure like this. The foo
property on Foo
can contain thousands of items. Sadly we need all of them at once, so we can’t paginate over it.
There’s only one resolver to resolve foo
itself which is quite fast (getting the nested object from a Mongo DB).
Our current workaround is to implement a custom JSON
scalar which just returns the data, by-passing all child resolvers. But this way we’re loosing everything that GraphQL gives us.
Is there anything that can be used to speed this up without using a JSON
scalar or is this the best solution already? I know that GraphQL comes with some overhead but this can go up to 20 seconds vs 1 second with JSON
scalar.
We’re using Ariadne in sync-mode.
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (9 by maintainers)
Top Results From Across the Web
c# - Filter large list object on data from another large list: slow ...
First I though of a solution with Hashet<> or Dictionary<> but that doesn't really fit into this use case. How about speeding it...
Read more >Why adding new objects to List/Dictionary is so slow (>200 ns ...
But you must be carefull that you don't be slowed down by garbage collection, too! So you have to store a reference to...
Read more >List.Distinct() is running really slow with 2 million+ objects
ToList() calls, especially considering after doing all the work to build the lists you throw them away? Next: "Why is Distinct() taking so...
Read more >How to fix slow List updates in SwiftUI - Hacking with Swift
The problem is, it's trying to compare 600 row items against 600 other row items, and that's extremely slow. Worse, if we had...
Read more >Related List is Loading the sc task very slow. - ServiceNow
You query seems fine but may be due to large number of records in sys_email table it is taking the to get the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@rafalp any updates on getting the 0.13 release of Ariadne published with the upgrading of graphql-core to 3.1 change?
@levrik correct. We’ve updated GraphQL-Core to 3.1 in 0.13 and will ship it in few weeks, once the rest of features pull requests have been merged.