I've been experiencing performance problems wrt the button widget which usually manifest itself when there's a lot a button being created. I've posted a question on Stack Overflow but I haven't had any luck yet. I'm hoping for more constructive answer if I post my question directly here.
To resume what's the problem, when I have lots of button on the same page it takes a crazy long time to load, say around 8-10s for 800 buttons in IE, but when I don't use the button widget but plain html buttons it takes 600-700ms. Same thing happens in Chrome, albeit the timings look like 700ms vs 40ms. As a work-around I've applied the button styling manually (ie adding the classes, the inner span for the text and the hover hook) and it's still pretty snappy.
If this wasn't enough, the button widget also dramatically slows down destruction time. When I empty the form (using jquery's .empty() method) it takes the same time it took to create the buttons (ie ~8s)!
I'd really appreciate it if anyone could give me pointers on how to avoid/fix this problem. For now I apply the styling manually, but that seems more of a hack than anything.