appcelerator very slow parse ajax query

70 Views Asked by At

I am developing an app on appcelerator studio.

When I get data with ajax app in simulator load view very very slow. Code which I get data (I use XHR with Deferreds (based on jQuery's $.ajax) for Titanium Alloy):

function getItemInfo(){
Alloy.Globals.loader('show');
var method = 'getFirm';
$$.ajax({
    url: Alloy.Globals.apiUrl + method + Alloy.Globals.apiKey,
    data: {
        param1: args.exec.item_id
    },
    type: 'GET',
    success: function(e) {
        render_card(e.data);
    },
    error: function(e) {
        Alloy.Globals.show_error(); 
    },
    complete: function(e) {
        Alloy.Globals.loader('hide');
    },
    async: false,
    timeout: 10000,
    parse: false
});

}

Logs:

INFO] :   art: Background partial concurrent mark sweep GC freed 145390(4MB) AllocSpace objects, 0(0B) LOS objects, 16%% free, 19MB/23MB, paused 0 total 130ms

[INFO] :   art: Background partial concurrent mark sweep GC freed 146970(4MB) AllocSpace objects, 0(0B) LOS objects, 16%% free, 19MB/23MB, paused 0 total 180ms

What am I doing wrong?

0

There are 0 best solutions below