在dom变慢之前你有多少div可以变得不稳定? [英] how many div's can you have before the dom slows and becomes unstable?
问题描述
应用程序开始无响应和缓慢之前,可以有多少个div?
任何人都有这方面的想法?
编辑:它是一款运行在Safari上的iPad应用程序,它的基本内容将不到1000 div
说实话,如果你真的需要一个绝对的答案,那么你可能想重新考虑你的设计。 / p>
这里给出的答案是正确的,因为它取决于许多特定于您的应用程序的因素。例如。重要和小CSS使用,div的大小,每个div需要的实际图形呈现量,目标浏览器/平台,DOM事件侦听器的数量等。
em>只是因为你不能意味着你应该!: - )
I am developing a jQtouch app and each request done via ajax creates a new div in the document for the loaded content. Only a single div is shown at any one time.
How many div's can I have before the app starts getting unresponsive and slow?
Anyone have any ideas on this?
EDIT: Its an iPad app running on Safari, and it would be less than 1000 div's with very basic content
To be honest, if you really need an absolute answer to this question, then you might want to reconsider your design.
No answer given here will be right, as it depends upon many factors that are specific to your application. E.g. heavy vs. little CSS use, size of the divs, amount of actual graphics rendering required per div, target browser/platform, number of DOM event listeners etc..
Just because you can doesn't mean that you should! :-)
这篇关于在dom变慢之前你有多少div可以变得不稳定?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!