Highlighted

Very slow response time with URLLoader on iOS 8

New Here ,
Oct 09, 2014

Copy link to clipboard

Copied

We've got some issues on our project regarding the time required to receive data with an URLLoader since iOS 8. Calling a simple web service returning a very tiny json answer jumps from a few milliseconds on iOS 5-7 to somewhere between 2 to 30 seconds on iOS 8. We tested with Wifi only, on iPhone 5S, iPhone 6, and iPad Air.

There may be an issue with AIR because we don't have any problem with Safari.

Does anyone have the same problem?

TOPICS
Development

Views

980

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Very slow response time with URLLoader on iOS 8

New Here ,
Oct 09, 2014

Copy link to clipboard

Copied

We've got some issues on our project regarding the time required to receive data with an URLLoader since iOS 8. Calling a simple web service returning a very tiny json answer jumps from a few milliseconds on iOS 5-7 to somewhere between 2 to 30 seconds on iOS 8. We tested with Wifi only, on iPhone 5S, iPhone 6, and iPad Air.

There may be an issue with AIR because we don't have any problem with Safari.

Does anyone have the same problem?

TOPICS
Development

Views

981

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 09, 2014 0
Oct 09, 2014

Copy link to clipboard

Copied

Thanks for reporting the issue.

I have tried to reproduce this issue, but it is not reproducible at my end. It may depend on Network speed and File Size.

Could you please provide a sample app for this.

-Pravendra

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 09, 2014 0
New Here ,
Oct 09, 2014

Copy link to clipboard

Copied

Actually it seems more prevalent with our web service on Google App Engine. I can't provide the url, but we can repro with this one: https://testfor367.appspot.com/ for example. It seems all https appspot.com subdomains are affected. We're currently looking for other urls with the same defect, and also trying to know if this has something to do with https or not...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 09, 2014 0
New Here ,
Oct 09, 2014

Copy link to clipboard

Copied

That's it, no problem with http, but a slow response time with https. So I guess this is an issue between AIR, iOS 8 and the process to secure the http protocol on appspot.com.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 09, 2014 0
New Here ,
Oct 10, 2014

Copy link to clipboard

Copied

It seems linked to the size of the sent or received payload, so bandwidth related. However that's not comparable to a regular bandwidth issue. For example if I send a 10KB payload with HTTP, no problem, it's done in two hundred milliseconds or so. But the same request with the same 10KB payload in HTTPS will take up to 20 seconds to get an answer. But a request with only a few bytes of payload in HTTPS will get an answer in a second or so. And this issue happens only on iOS 8.

Please let me know if you're still unable to reproduce. It's just a simple project with an URLLoader. We tested on both AIR 14 and 15.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 10, 2014 0
Oct 13, 2014

Copy link to clipboard

Copied

I have tried to reproduce the issue using below code snippet:

var loader:URLLoader = new URLLoader();

configureListeners(loader);

  var request:URLRequest = new URLRequest("https://testfor367.appspot.com//");

  try {

  loader.load(request);

  } catch (error:Error) {

  trace("Unable to load requested document.");

}

But I am not seeing any difference on loading the data in iOS 7 and 8 devices.

data is loaded within 2 seconds.

-Pravendra

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 13, 2014 0
New Here ,
Oct 13, 2014

Copy link to clipboard

Copied

Could you try adding:

var bytes : ByteArray = new ByteArray();

for(var k : int = 0 ; k < 2048 ; k++)

  bytes.writeUnsignedInt(0xFFFFFFFF * Math.random());

var variables : URLVariables = new URLVariables();

variables["payload"] = Base64.encode(bytes);

request.data = variables;

Just to have a little random payload.

Thanks.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 13, 2014 0
Oct 13, 2014

Copy link to clipboard

Copied

I have added above payload code into my code snippet and getting the below error on debugging the code:

progressHandler loaded:273 total: 273

httpStatusHandler: [HTTPStatusEvent type="httpStatus" bubbles=false cancelable=false eventPhase=2 status=400 redirected=false responseURL=null]

ioErrorHandler: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: https://testfor367.appspot.com/?payload=8dgzb2qLiyXtEdtpf1......." errorID=2032]

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 13, 2014 0
New Here ,
Oct 13, 2014

Copy link to clipboard

Copied

Did you debug this directly on iOS 8? Do you have the same result on iOS 7? Because we sometimes have stream errors like that when the request takes too much time to complete. As you can see, the URL is alive on a desktop browser, so you shouldn't have this stream error.

In this case, reducing the payload could help notice the slow response time and avoid the stream error.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 13, 2014 0
New Here ,
Nov 03, 2014

Copy link to clipboard

Copied

Issue still reproducible on iOS 8.1

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 03, 2014 0