DataFetchingFieldSelectionSet updates in 16.1 can't handle recursive schema properly and causing slowness
See original GitHub issueDescribe the bug We are upgrading our library dependency from 15.0 to 16.1 recently and found that DataFetchingFieldSelectionSet updated at https://github.com/graphql-java/graphql-java/pull/2079 has a regression in performance making our HTTP request 10+ times longer.
We use Java Flight Recorder to narrow down the root cause and found that it is because the HashMap.resize() in NormalizedQueryTreeFactory.createNormalizedQueryImpl
.
Below screenshots show that the normalizedFieldToMergedField has 1.29 M entries and other local variables here also extremely large in size.
To Reproduce Please provide a code example or even better a test to reproduce the bug.
Issue Analytics
- State:
- Created 3 years ago
- Comments:24 (11 by maintainers)
Top Results From Across the Web
graphql-java - Bountysource
DataFetchingFieldSelectionSet updates in 16.1 can't handle recursive schema properly and causing slowness $ 0 ... Created 1 year ago in graphql-java/graphql-java ...
Read more >About the security content of iOS 16.1.1 and iPadOS 16.1.1
This document describes the security content of iOS 16.1.1 and iPadOS ... Recent releases are listed on the Apple security updates page.
Read more >iOS 16 Problems: 11 Common iPhone Issues and How to Fix ...
From battery issues, to the feeling that an iPhone is hotter than normal, to sluggish performance, problems with installing the update ...
Read more >Apple iOS 16.1.1 Release: Should You Upgrade? - Forbes
That said, while numerous iOS 16 bugs remain, there are no new deal breakers here. There are some quiet fixes as well (more...
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
@aleksandarsusnjar I think it is related. meanwhile I just downgraded to 15.0 so that I can continue to work on the project.
Hi @andimarek, sorry for the delay.
It seems the DataFetchingEnvironment#selectionSet() now resolves fields lazily upon accessing
environment.getSelectionSet().getFields()
and that finishes instantly.I verified that this fixed my issue originally raised on Feb.
Edit: Got an NPE “java.lang.NullPointerException: null value in entry: viewAs=null” for the below
graphql.com.google.common.collect.CollectPreconditions.checkEntryNotNull(CollectPreconditions.java:32) … graphql.com.google.common.collect.ImmutableMap.copyOf(ImmutableMap.java:438) graphql.normalized.NormalizedField$Builder.resolvedArguments(NormalizedField.java:310)