如何优化 Flash/Actionscript 中的帧速率?
我正在使用 Flash 资源在 Actionscript 中构建一个应用程序,当我尝试在屏幕上渲染 20 多个资源时,我的帧速率变得非常低 (~7 fps),即使这些资源中的大多数都是停止的影片剪辑。我尝试将 .cacheAsBitmap 设置为 true,这有一点帮助,但还不够。我还能做什么来提高帧速率?我注意到某些影片剪辑似乎比其他影片剪辑对其影响更大,但我不确定如何更改它们以使它们更容易渲染。
谢谢!
I'm building an application in Actionscript using Flash assets, and my frame rate becomes very low (~7 fps) when I attempt to render 20+ assets on the screen, even though most of those assets are stopped movie clips. I've tried setting .cacheAsBitmap to true, which helps a bit, but not enough. What else can I do to get the frame rate up? I've noticed that some movie clips seem to impact it more than others, but I'm not sure how to alter them to make them easier to render.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
很难猜测是什么导致屏幕上如此少量的资源出现速度减慢,但首先要检查是否存在内存泄漏或过多的内存使用情况。为了在调试项目时获得良好的 FPS/mem 显示,我推荐 MrDoob 的 Stats
如果确实如此没有发现任何明显的罪魁祸首,你需要更深入地挖掘,我发现的最好的工具(并在我自己的所有项目中使用)是 Grant Skinner 的 性能测试
It's hard to guess what could be causing the slowdown at such a small number of assets on screen, but the place to start would be to check for a memory leak, or excessive ram usage. To get a nice FPS / mem display while debugging your project, I recommend MrDoob's Stats
If that does not turn up any obvious culprits and you need to dig deeper, the best tool I've found (and use on all my own projects) is Grant Skinner's PerformanceTest
从描述来看,好像是漏水了。
By the description, it looks like it's leaking.