gql-dart / ferry

Stream-based strongly typed GraphQL client for Dart
https://ferrygraphql.com/
MIT License
602 stars 116 forks source link

Delayed parsing #495

Closed zombie6888 closed 1 year ago

zombie6888 commented 1 year ago

I have junks on page animations when i parse a big json data. For mobile and desktop applications i can use isolates and it works very good. I have no junks there. But it's not supported for web. Probably it's a not a good solution but can i use queries in this sequence: run query, get response, wait for page animations finished and then parse response?

knaeckeKami commented 1 year ago

Are you sure it's parsing that is the issue and not normalization / de-duplication of updates? Does that jank also happen when so set the CachePolicy to .NoCache?

zombie6888 commented 1 year ago

It's only happens with big data. if i limit response or use paginated queries, i don't see any junks. And when i use isolates on mobile/desktop devices there is no junks. It's nice to have but not so bad If it's not supported

zombie6888 commented 1 year ago

Now i think it wouldn't make sense. Anamation takes about 200-300ms. If i get network response more than 300 ms it doesn't affect animation. But when i get response from 10 - 100 ms i see junks (we just moved from cloud to self host hasura server). 10-100 ms delay is not a big problem. I can run both query and parsing after animation finished. And there are many options like using pagination on big data or disable page loading animation which is better for this. Close this issue.