Replies: 2 comments 6 replies
-
That code isn't used in production though, it's dev-only code https://github.com/FormidableLabs/urql/blob/f4266f29cc9e55affe4c952701c8a034435bbb16/exchanges/graphcache/src/operations/query.ts#L304 EDIT: but |
Beta Was this translation helpful? Give feedback.
-
@alexesDev Thanks for sending a trace over! I've also sent it to @kadikraman, who knows a great deal more about React Native than I do. I've also queried your API and I've seen that the overall payload is around 2.1MB. Are you sure you aren't overfetching here? 😆 I know this is a lot of data and (in production) two seconds may be an appropriate time to process it, so just in the interest of time here, would you say that a multi-second time may not be expected here? |
Beta Was this translation helpful? Give feedback.
-
Hi. I see what isFieldAvailableOnType and getField too slow due to the non-optimized code...
You can use startsWith or indexOf instead test. And also this condition rechecked in getField
I'm right?
https://github.com/FormidableLabs/urql/blob/f4266f29cc9e55affe4c952701c8a034435bbb16/exchanges/graphcache/src/ast/schemaPredicates.ts#L67
https://github.com/FormidableLabs/urql/blob/f4266f29cc9e55affe4c952701c8a034435bbb16/exchanges/graphcache/src/ast/schemaPredicates.ts#L42
Beta Was this translation helpful? Give feedback.
All reactions