I think Onkar may be on the right track.
The critical question is: How much of what will eventually be needed is known when the dialog is first created?
IF you can not prepare anything in advance, the user perception of performance is the only thing you can tackle. Since this is a web application, perhaps you could use AJAX techniques to update the display information without reloading the page, thus reassuring the user that progress is being made.
Lucky you, the ranch has some real experts on AJAX - vist the HTML and JavaScript forum.
Bill