Windows Phone 7 和 IE DOM 性能
我一直在为 Windows Phone 和 iPhone 创建一个 Javascript/jQuery 重型应用程序。 该应用程序已接近完成(除了一些小功能),但在 Windows Phone 7 (IE9 Mango) 上使用一段时间后,性能会慢慢下降。
它开始得非常快,但是在进行了一些 DOM 更改(添加和删除等)之后 - 单击按钮有一点滞后 - 之后每次单击几乎有一整秒的滞后!
我只是想知道是否有办法“刷新”DOM?或者某种重置 DOM 缓存的方法(如果有的话?)
也许我错过了一些明显的东西......
有什么想法吗?
谢谢人们!
I have been creating a Javascript/jQuery heavy application for Windows Phones and iPhones.
The app is very nearly complete (bar a few little features), however the performance slowly degrades after periods of use on a Windows Phone 7 (IE9 Mango).
It starts off very fast, but after a few DOM changes (appending and removing etc) - Clicking buttons has a bit of lag - then almost a whole second of lag per click a little while after that!
I was just wondering if there was a way to "refresh" the DOM? or some way of resetting the DOM cache (if it even has one?)
Maybe I'm missing something obvious...
Any ideas?
Thanks people!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
既然你说性能慢慢下降,那么这很可能是内存问题。
您可以在桌面上测试您的页面,看看是否有类似的问题。以下是测试方法:
http://ajax.dynatrace.com/ajax/en/< /a>
如果您想提高 IE 的性能,这是最好的工具。它很复杂,但显示了有关您网站的大量数据。
http://gent.ilcore.com/2011/08/ find-memory-leaks.html 您还可以使用 chrome 内存分析,如本文所述。
这些也可以提高性能:
Since you say performance slowly degrades, there is a good chance this is a memory problem.
You can test your page on desktop to see if you have the similar problem. Here are ways to test:
http://ajax.dynatrace.com/ajax/en/
This is the best tool if you want to improve performance in IE. It is complex, but shows an incredible amount of data about your site.
http://gent.ilcore.com/2011/08/finding-memory-leaks.html You can also use chrome memory profiling, like the article describes.
Also these would improve performance: