Replies: 10 comments 1 reply
-
You can use the following API https://api.chat.graphql-flutter.dev/graphql to create a small demo app to reproduce your problem in a local env. In addition, you can try to upgrade and reproduce the problem with the last beta https://pub.dev/packages/graphql_flutter/versions/5.1.1-beta.4/changelog I'm not able to understand you image because I think there is a missing context, but with the demo we can track this down |
Beta Was this translation helpful? Give feedback.
-
Let me try to do that. |
Beta Was this translation helpful? Give feedback.
-
Hi all, Here is an update on this thread. I took a different route to figure out the root cause. I checked out that flutter_graphql lib code and found that https://github.com/aquadesk/collection and it indeed took really long for the deep equal There is a payload hardcoded in the file.
I really took 0.5 second to only run equality check. I don't think this is an easy fix. I am thinking about checking out apollo implementation to see how they deal with this since I've never experienced this on web apps. cheers. I am using strapi for graphql service (headless CMS) schema is looking something like this
|
Beta Was this translation helpful? Give feedback.
-
Given each sub-document is individually cached, is deep equality needed? Maybe a reference check could be done first and then a deep equality check could be used as a fallback? |
Beta Was this translation helpful? Give feedback.
-
I realized that setting Thanks
|
Beta Was this translation helpful? Give feedback.
-
This is an important and significant point that anybody who might want to use graphql-flutter should be aware of. Is it not also something that you aim to fix given the impact? Feel like this was better as an issue rather than a discussion. |
Beta Was this translation helpful? Give feedback.
-
I agree. |
Beta Was this translation helpful? Give feedback.
-
I move it as a discussion because this needs more love in studying this specific use case! and also we do not have a reproducible example, so I will not go to work on it till I have some example that can make me happy to test my solution. Changing how we do the equality check can be dangerous with not enough justification because can change the bheaivoid of one app. We can try to pass an equality function provided by the user in this case and make all happy, but for now, I have other stuff on my todo list and this required to be reproduced in some way or another maybe @budde377 has space in the todo list? |
Beta Was this translation helpful? Give feedback.
-
I'll try and pick up these performance bugs next. I think the
thorough analysis done here should be enough to get me going.
…On Wed, Aug 10, 2022 at 9:47 AM Vincenzo Palazzo ***@***.***> wrote:
I move it as a discussion because this needs more love in studying this
specific use case!
and also we do not have a reproducible example, so I will not go to work
on it till I have some example that can make me happy to test my solution.
Changing how we do the equality check can be dangerous with not enough
just because can change the bheaivoid of one app.
We can try to pass an equality function provided by the user in this case
and make all happy, but for now, I have other stuff on my todo list and
this required to be reproduced in some way or another
—
Reply to this email directly, view it on GitHub
<#1195 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2UFS4RN3O4T7XTQS3ACW3VYNUCJANCNFSM56CYJHRA>
.
You are receiving this because you commented.Message ID:
<zino-hofmann/graphql-flutter/repo-discussions/1195/comments/3364572@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
It affects every non trivial query in my app. The app isn't that complex. We decided we'd have to move off this library or fix it ourselves since the performance/jank is beyond limits our users (or even the programmers) are willing to accept. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I have a list page and tapping one of them opens a detail view page
On every detail view load, it comes with a jank
I am not certain about the root cause of the janks
But what I see on the dev tools, it seems it's coming from managing cache.
In my stateful hook widget, i do
It seems it takes 2.5s to run a query and process it on a device (one plus 6) in a profile mode.
I am not a professional flutter engineer so please excuse me for wrong terms or assumptions.
I can provide more context or code snippet how I do things on my app but not sure how much I should share to give a proper amount of context for this.
I've tried almost everything that could contribute to this jank but I see that as soon as the app makes a graphql query, it janks.
Even with the Fetch policy noCache.
I was using 5.1.1. beta 2
Thanks for the awesome project!
Any idea, direction or suggestion how I should go about figuring out what is causing the jank would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions