Search code examples
htmldomxhtmljqtouch

how many div's can you have before the dom slows and becomes unstable?


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


Solution

  • 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! :-)