[@dev-plugins/react-query] React query dev tools cause major performance drop
Hey,
We've been using the react-query devtool plugin for a long time now. After upgrading from Expo SDK 51 to 52 which upgraded this package from 0.0.7 to 0.1.0 we noticed a huge performance drop in the JS thread. We're firing what I'd consider a very reasonable amount of requests on the initial load of the home screen (about 10-15, most if not all of them return in less than 100ms).
When the useReactQueryDevTools(queryClient) line is commented out everything works normally but when it's included the performance tanks and the app is not interactive for about 10-15 seconds, that is, you can scroll but not tap buttons. The UI thread is not affected, only the JS thread.
For now we're going to leave the plugin commented out by default and only enable it when we need to during development. Any help would be greatly appreciated.
Thanks!
Just want to jump in to say that we are having the same experience, and that you are not alone, @ybentz .
My team is suffering from the same issue as well, right after upgrading from Expo 51 to 52, any updates or findings that we can patch at the moment?
(We have to comment the devtool plugins out to have normal performance, and we are using these dev-tools from dev-plugins :@dev-plugins/react-navigation, @dev-plugins/react-native-mmkv, @dev-plugins/react-query)
@Kudo thanks for figuring out a fix for this issue! I see you closed this issue and then reopened and created another PR that's already been merged, is the 2nd PR supposed to close this issue completely or are there any other fixes that you know of that should be implemented first?
Are the fixes going to land on Expo 52?
@ybentz the fix will be a breaking change between expo and all devtools plugins. i'll have to publish all the packages. will update publish information and close the issue when i publish the packages tomorrow.
published [email protected] and all @dev-plugins/*@0.2.0. for react-query, please try to use [email protected] with @dev-plugins/[email protected]. hopes it help for the performance issue
Thank you for the quick turnaround! I will hopefully give it a go soon and report back.
also cc the other plugin authors @matt-oakes @dmt-op @thomasrebam. sorry to bring the breaking change but [email protected] has a breaking change to fix the performance regression. would love to have your support to publish newer plugin versions.
though sdk 53 would have the other breaking change from https://github.com/expo/expo/pull/35376 😞 sorry for that
Do you have an estimation on when SDK 53 would be out with the second breaking change. I have limited bandwidth currently so ideally I would only release one new major version of the dev plugin, if possible.
Hey @Kudo, I would love to help! Though I am not quite sure how I can help you, apart from rebasing on your changes and publishing a version on my side for now. What would you need more?
sorry! i realise that there are more plugins than expected. i think i would try to add backward compatibility support on sdk 52, and leave breaking change to sdk 53. the pr draft is at https://github.com/expo/expo/pull/35748
i created prs to redux-devtools-expo-dev-plugin and file-explorer-expo-dev-plugin and i'm going to close this issue. it should be resolved from newer sdk 52 and sdk 53.
@thomasrebam if you have a github repo for the react-navigation devtools plugin and would like to have my help to upgrade for sdk 53. please let me know.