Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow performance #45

Open
nexus061 opened this issue May 21, 2015 · 3 comments
Open

Slow performance #45

nexus061 opened this issue May 21, 2015 · 3 comments

Comments

@nexus061
Copy link

Hello,

AjaxAnywhere.processXmlResponse function is too slow in iexplorer (edge mode)
with large dataset

i have changed
$("#" + id).html($(zoneNode).text());

with

var text=$(zoneNode).text();
var div = document.getElementById(id);
div.innerHTML = text;

more faster, even if i have problems with links ajax

@aruizca
Copy link
Member

aruizca commented May 21, 2015

Thanks @nexus061
I think this might be related to the version of jQuery you are using. Latest versions dropped support for old IE versions.
Could you tell me what versions of IE and jQuery are you using?

@nexus061
Copy link
Author

I use query-1.11.2.js and IExplorer 11,

to refresh one zone with large data (table scrollable with 8000 elements)

Iexplorer run for 90577 millis
with innerHTML 1058 millis

This workaround does not apply the scripts included in the zone

@nexus061
Copy link
Author

The problem is in the function .html(), jquery run controls

// See if we can take a shortcut and just use innerHTML
        if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
            ( support.htmlSerialize || !rnoshimcache.test( value )  ) &&
            ( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
            !wrapMap[ (rtagName.exec( value ) || [ "", "" ])[ 1 ].toLowerCase() ] ) {

            value = value.replace( rxhtmlTag, "<$1></$2>" );

            try {
                for (; i < l; i++ ) {
                    // Remove element nodes and prevent memory leaks
                    elem = this[i] || {};
                    if ( elem.nodeType === 1 ) {
                        jQuery.cleanData( getAll( elem, false ) );
                        elem.innerHTML = value;
                    }
                }

                elem = 0;

            // If using innerHTML throws an exception, use the fallback method
            } catch(e) {}
        } 

very slow controls...

the flow not enter in the body of if.

and run this

if ( elem ) {
this.empty().append( value );
}

i have replaced

$("#" + id).html($(zoneNode).text());

with

$("#" + id).empty().append($(zoneNode).text());

and work (less rapid than innerHtml) 2000 millis 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants