Network.Request really slow on Nook Tablet and Kindle Fire

I’ve been hammering some bugs in my app tonight but I got a chance to experiment.

I loaded up .971 and made an amazon and nook build. Still not seeing any lag on network.requests. If your confident it’s not your code, I am confident it isn’t Corona. My next suspicion is the kindle/nook, being cheaper tablets, maybe do not work well with your wireless router. If you can test on a different wireless connection, perhaps that is a problem. [import]uid: 56820 topic_id: 36061 reply_id: 143554[/import]

The fact that loading the page in the web browser is fast, yet loading the same html content with a GET request using network.request being slow on the same device points to some difference with Corona (as compared to the browser) that is causing the slowdown.
The fact that the browser is fast to load the same page rules out a general issue with the hardware or with the wifi connection.

Early in my investigation, I also thought it might be wifi related, and I tried connecting via three different wifi routers (seeing the same results) prior to realizing that access via the native web browsers on both the Nook Tablet and Kindle Fire does not have the same performance issue as Corona’s network.request call.
[import]uid: 14461 topic_id: 36061 reply_id: 143601[/import]

Good point. I totally overlooked your tests on the browser. Sorry about that.

If it is indeed a bug with Corona it is not a simple bug. I don’t see it happening and I have not read of any other complaints. Have you attempted to load a simple URL like google.com to see if it’s fast and has no errors? I don’t see anywhere you mentioning what URL you are testing.

If you can, can you share the code you use for the network.request that is slow? Including the headers etc. Something about the call itself may not jive with Corona. [import]uid: 56820 topic_id: 36061 reply_id: 143617[/import]

O.K. I finally got to the bottom of this.

It turned out to be a reverse DNS issue at the server hosting provider that resulted in a reverse DNS query timeout. This only showed up on HTTPS connections from the Kindle Fire and Nook Tablet, because there is an Android 2.3.x bug, that causes the client to unnecessarily perform a reverse-DNS query on https negotiation:
http://code.google.com/p/android/issues/detail?id=13117

There is a workaround in the details (follow the link above) to keep clients from performing the unnecessary rDNS query. My guess is that the native web browsers on Android 2.3.x implemented the workaround (which is why the connection from the web browser on the Nook Tablet and Kindle Fire is fast), but that the network.request() implementation in Corona does not implement the workaround to avoid the unnecessary reverse-DNS query.

The network.request() implementation should really be updated to implement the workaround to avoid an unnecessary rDNS query if the target OS is an Android platform affected by this bug.

Note: The server rDNS issue was verified using:
dig -x serverIP +trace
[import]uid: 14461 topic_id: 36061 reply_id: 143626[/import]

wow. nice find and very good to know [import]uid: 32462 topic_id: 36061 reply_id: 143637[/import]