You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

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"

API响应时间截图

内容的提问来源于stack exchange,提问作者Quan Le

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.17 21:50:38