Since upgrading to ExtJS 4.1, we are getting the "A script on this page is causing your web browser to run slowly" prompt in IE8 in places where we never saw it before.

We have a few places where form components are built up dynamically in loops, and these seem to be worse affected. Even simple things like live-search combo boxes are affected though.

The message comes up almost instantly without any delay.

These parts were all fine in ExtJS 4.0.7.

I know the message is related to the amount of lines of JavaScript statements to be executed. Therefore, since our code hasn't changed, I imagine the amount of statements in ExtJS 4.1 must've increased dramatically.

Is there anything at all we can do to sidestep this issue without having to attempt redesigns on our screens?

The weird thing is, if you dismiss the prompt, the screen continues to run perfectly fine at a very reasonable speed. However, the product isn't really in a fit state to sell with this prompt appearing everywhere.

Thanks...

26 Jun 2012, 1:49 AM

evant

If you're doing something like this:

Code:

var ct = new Ext.container.Container({
renderTo: document.body
});

for (var i = 0; i < 100; ++i) {
ct.add({});
}

It will trigger 100 layouts, which may cascade up. Instead, do something like this: