dialog slow opening/closing to the point of not being usable...(IE-only problem, naturally...)

dialog slow opening/closing to the point of not being usable...(IE-only problem, naturally...)


I am just opening a small dialog box in a web page that resides in an
iframe.
Code is as follows:
$(function(){
    $('#test_dialog')
    .dialog({
title: 'this is a test',
width:300,
height:150,
buttons:{on:function(){alert('toto')},
'close':function(){$(this).dialog('close')}},
autoOpen:false,
open: function(ev, ui){var t = new Date(); $('#dialog_contents').html
((t.getTime()-start_time) + ' ms')}})
})
Code to open is simply $('#test_dialog').dialog('open') on button
click.
Before opening the dialog, I record the current time in start_time.
With Chrome, the dialog reports 40ms the first time the dialog opens,
thereafter 12 ms each time.
With Safari 3.1, it's 42 ms the first time, then 10 ms each subsequent
time.
With Firefox, it's more like 40-50ms.
With IE: an amazing 3500 ms, and sometimes more than 8000 ms. This is
unbearable.
Using 1.3.1 with ui 1.6 RC6
Now something interesting: if I close the dialog using my close button
(defined in the options), the dialog takes just about as much time to
close as it did to open. But if I use the X in the title bar to close
it, it closes instantaneously.
I am going to stick with the YUI dialogs for now. Never had a problem
with them. If only they were as programmer-friendly than the jQuery
stuff...
Anyone has an idea why this is happening (other than IE totally sucks,
which we all know!)? Any workarounds?
PS dragging is just as painful...