Titanium JIRA Archive
Appcelerator Community (AC)

[AC-6138] HTTP Request Performance

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionInvalid
Resolution Date2019-03-01T21:35:01.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsn/a
ReporterStewart Sims
AssigneeShak Hossain
Created2019-02-14T08:53:18.000+0000
Updated2019-03-01T21:35:01.000+0000

Description

We are experiencing slow performance making basic HTTP calls through Appcelerator. This seems to affect both Android and iOS builds, however iOS does seem to be slower overall. The requests are essentially basic HTTP POST calls and all go via the same function code below:
this.sendToServer = function(params, httpParams) {
	if (Alloy.Globals.NETWORK_ENABLED) {
		var xhr = Ti.Network.createHTTPClient(params);
		xhr.validatesSecureCertificate = false;
		xhr.open('POST', this.url, true);
		xhr.send(httpParams);
	} else {
		params.onload();
	}
};
The same calls made via our web and desktop versions of the application are performing significantly better. We recently upgraded to Titanium SDK 7.4.2 & Appcelerator CLI 7.0.9. Unless there are any modifications to our code you can suggest, there seems to be a bug in the performance of the underlying requests perhaps introduced in a recent Titanium SDK change.

Comments

  1. Sharif AbuDarda 2019-02-20

    Hello [~ssims], Please provide a standalone sample code for reproducing the issue on our end. Please provide the full steps to follow for successful regeneration. Thanks.
  2. Stewart Sims 2019-02-25

    OK I will try to provide a sample within 1 week, please do not close this issue until I have had chance to upload the code. Thanks.
  3. Rakhi Mitro 2019-02-28

    [~ssims], OK. We will be waiting for that.
  4. Stewart Sims 2019-03-01

    OK I can confirm there must be some issue in the code of our mobile app only. A basic project reproducing the same HTTP requests does not have the same performance issues. I think this has to do with a complex operation involving the merging of two arrays after the request is completed. Feel free to close this issue, hopefully this has not wasted your time, and thank you for keeping an open mind and leaving this ticket open until now.

JSON Source