Question

I'm making a HTTP request and pulling in a JSON structure for my app data. I used code from the Alloy documentation, which includes a line that outputs the entire response text for debugging. Does this effect the overall performance of the app during run time?

var xhr = Ti.Network.createHTTPClient({
    onload: function(e) {
        Ti.API.debug(this.responseText);         
        // rest of function...
    }
});
Était-ce utile?

La solution

Ti.API.debug() are not executed outside of development environment and it's impact on performance is irrelevant.

However, if you want to make sure you can write function which is executed >1000 with simple operation: adding, multiplying random values and compare execution time.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top