OGeek|极客世界-中国程序员成长平台

标题: android - react 原生模态显示超慢iOS但不是Android [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-11 18:47
标题: android - react 原生模态显示超慢iOS但不是Android

我正在使用 React Native (RN 0.47) 构建一个应用程序。我们使用模式来显示信息,但在 iOS 上打开需要很长时间(在 Android 上速度非常快)。在 iOS (iPhone 6) 上大约需要 3 秒,而在 Android 上几乎是立即的。

调查表明时间都花在了 UI 而不是 JS 上。

我的 View 由 100 多个组件组成,我们真的不知道如何才能减少这个数量...

Screenshot of the modal

组件只是彩色 View 或文本。另一个选项卡当前为空。

是什么导致了 Android 和 iOS 之间的这种差异? 有什么办法可以减少这个显示时间?

非常感谢!



Best Answer-推荐答案


我们发现了问题。它与 Sentry 相关并且 react 原生:https://github.com/react-community/react-navigation/issues/608

使用 React-navigation 和 Sentry 时要小心!

关于android - react 原生模态显示超慢iOS但不是Android,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46441754/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4