PDA

View Full Version : "Script not responding" on destroy



irata
9 Sep 2010, 1:33 AM
Hello,

I have a TabPanel and some of the (Sub)Panels are very complex (>500 Elements (Panels, Grids, Fields, etc)). When I now close (destroy) the SubPanel my Browser (Firefox, IE) tell me on slower machines that the "Script is not responding" and I can choose to stop the script or to continue it.

Can someone tell me how to avoid this message. Is there a way to destroy a bigger form in chunks with a timeout of some milliseconds or something else?

I'm using ExtJS 3.0.0.

Thanks and best regards...

13 Sep 2010, 4:40 AM
Ext JS 3.0.0 had some serious speed issues. What I would suggest is trying to figure out a way to optimize what you're doing. >500 components on screen seems like a lot and you might be doing some unnecessary things.

If you don't want to go through your code and search for ways to clean things up, you could manage the destruction yourself. There are 'before' (beforeclose, beforedestroy) events that you can hook into and destroy the child items yourself. Just be aware that setTimeOut will "fork off" an asynchronous JavaScript execution stack causing timing issues.