I have a table with a large amount of HTML in it that I am trying to create a jQuery dialog on. This process is very slow (about 8 seconds in IE) which is unacceptable. It is usually very fast to create a dialog but with a large amount of markup it apparently isn’t.
I understand the reason for part of the performance issue is that it will remove and append the section to create the dialog on to the end of the DOM which is slow for such a large amount of HTML.
Is there any way to speed up the process by creating parts of the markup necessary for the modal manually, tricking jQuery UI into not moving the HTML or something else? I have already tried:
- making the modal not re-sizable
- making the modal not movable
- wrapping the table in another
I would like to continue to use the jQuery UI markup since we are using it elsewhere and have already spent the time to style it appropriately. Thanks!
Here is a very simple example that demonstrates the problem:
Came up with the best solution I could find with some advice from charlietfl. Made a post on it here: http://johnculviner.com/a-jquery-ui-dialog-open-performance-issue-and-how-to-fix-it/