Heroku渲染的反应组件是否很慢?
基本上,我已经使用Heroku部署了React应用程序。问题是,它的性能几乎不如Localhost的表现良好。例如,我有一个“动画播放器”组件,该组件显示图像并使用setInterval对其进行更新。在本地开发级别上,它运行了40 fps,但是当我在部署应用程序后尝试使用时,它可能以2 fps运行。我不明白这是怎么回事,因为我认为反应组件是由浏览器引擎呈现的,并且与Heroku服务器无关?升级我的帐户或切换到其他Web服务会改善我的应用程序的性能吗?任何洞察力都会有所帮助。谢谢!
Basically I've deployed my React app using Heroku. The problem is, it is not performing nearly as well as it was on localhost. For example, I have an "animation player" component that displays an image and updates it using a setInterval. At local dev level, it runs a smooth 40 fps, but when I tried my app after deploying it, it's running at maybe 2 fps. I don't understand how this can be since I thought React components are rendered by the browser engine and have nothing to do with the Heroku servers? Would upgrading my account or switching to some other web service improve my app's performance? Any insight would be helpful. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论