Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2661] android : regression with responseXML from 1.2.0 to 1.5.1 - slow XML parsing

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:59:44.000+0000
Affected Version/sn/a
Fix Version/sSprint-2011-09
ComponentsAndroid
Labelsandroid, defect, parse, release-1.6.0, responsexml, slow, xml
ReporterStephane
AssigneeDon Thorp
Created2011-04-15T03:26:18.000+0000
Updated2011-04-17T01:59:44.000+0000

Description

an XML with 100 rows (on iphone xml parsing is very fast)

on android & SDK1.2.0 only 1 second to enter the loop (and seeing the actInd.message = 'loading : '+x+'/'+items.length;)
with SDK1.5.1 it can take up to 20 seconds.

var actInd = Titanium.UI.createActivityIndicator({message:'Waiting...'});
actInd.show();

var xhr = Ti.Network.createHTTPClient();
xhr.open("GET","distant_XML");
xhr.onload = function()
{
    try
    {
        var doc = this.responseXML.documentElement;
        var items = doc.getElementsByTagName("tag");
        var x = 0;
        for (var c=0;c<items.length;c++)
        {
                actInd.message = 'loading : '+x+'/'+items.length;
        }
        
        

    }
    catch(E){}
};

xhr.send();

Comments

  1. Stephane 2011-04-15

    this has been fixed in 1.6.0 - parsing is ultra-fast now

    thanks

    this issue can be marked as solved

  2. Don Thorp 2011-04-15

    Marking resolved as requested.

JSON Source