React Native中amazon-cognito-identity-js的authenticateUser函数过慢求助
React Native中amazon-cognito-identity-js的authenticateUser函数执行过慢(API响应正常)
我在React Native项目里集成amazon-cognito-identity-js库时遇到了严重的性能问题:authenticateUser函数在不同设备上运行耗时极长——iPhone XS需要40秒,Samsung Galaxy A11更是要70秒。
通过抓包确认,Cognito的API响应仅约200毫秒,说明网络环节没有问题,慢的原因应该出在库的本地后续处理步骤里。
我已经花了几周时间查找解决方案但毫无进展,恳请有相关调试或优化经验的开发者提供解决思路。
项目依赖版本如下:
"react-native": "0.66.3", "@react-native-async-storage/async-storage": "^1.17.10", "aws-amplify": "^4.3.34", "aws-amplify-react-native": "^6.0.5", "amazon-cognito-identity-js": "^5.2.10"

内容的提问来源于stack exchange,提问作者Quan Le
相关产品推荐
相关产品推荐

