1. #1
    Ext JS Premium Member CalmDownMonkey's Avatar
    Join Date
    Dec 2010
    Posts
    18
    Vote Rating
    0
    CalmDownMonkey is on a distinguished road

      0  

    Exclamation IE8 "Unresponsive Script" Prompt

    IE8 "Unresponsive Script" Prompt


    Hi,

    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...

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,124
    Vote Rating
    514
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    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:

    Code:
    var ct = new Ext.container.Container({
        renderTo: document.body
    });
    
    Ext.suspendLayouts();
    for (var i = 0; i < 100; ++i) {
        ct.add({});
    }
    Ext.resumeLayouts(true);
    Similarly, if you're doing some kind of bulk operation on a view:

    Code:
    store.forEach(function(rec){
        rec.set('someField', rec.get('someField') + 1); // triggers n row updates
    });
    Code:
    store.suspendEvents();
    store.forEach(function(rec){
        rec.set('someField', rec.get('someField') + 1); // triggers n row updates
    });
    store.resumeEvents();
    grid.getView().refresh();
    Also see: http://www.sencha.com/blog/ext-js-4-1-performance
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Ext JS Premium Member CalmDownMonkey's Avatar
    Join Date
    Dec 2010
    Posts
    18
    Vote Rating
    0
    CalmDownMonkey is on a distinguished road

      0  

    Default


    Brilliant, that seems like it would give us a huge performance boost too! Thanks so much for taking the time to write that! We'll try it out now.

  4. #4
    Sencha Premium Member couetbis's Avatar
    Join Date
    Jan 2008
    Location
    Nantes - France
    Posts
    105
    Vote Rating
    1
    couetbis is on a distinguished road

      0  

    Default


    Have you a feedback with these suggestions ?

  5. #5
    Sencha Premium Member
    Join Date
    Sep 2013
    Posts
    2
    Vote Rating
    0
    jalsql is on a distinguished road

      0  

    Default Thanks! This worked

    Thanks! This worked


    Thank you for this solution. Had some code that was giving me this error.
    Applying this fix, solved the issue. Thanks!!!

Thread Participants: 3

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar