JSON request much faster when Connect app is active

I have noticed that JSON requests are way faster when the Connect app on my iPhone is running. Without starting the connect App a 1.2 kb request from my web service takes about 9 seconds until the onReceive method has been executed. With launched Connect app the same request takes less than 2 seconds. Why is that and is this the normal behavior?

Ben
  • I've submitted this for investigation. Thanks for the report!
  • I've also noticed this. My JSON request takes 2 seconds if the iPhone 5s connect app is actually open whereas it's about 6+ seconds when it's not.

    If we can get widgets to be that responsive (2 secs) it will make for a MUCH better UX!

    Any news Garmin? I think this one is REALLY important.

    Ta.
  • If you think it's an iPhone issue, then sure sounds like an issue in iOS... A priority thing... With GCM in foreground on the phone, it's got a higher priority than if it's in the background, and "gets going" faster. I doubt anything will change in iOS....

    As far as the speed of makeJsonRequest() in general, using the same app, with the same phone (andriod), with GCM open all the time, I've seen responses in a few seconds, or 10 seconds or more.... There are many other variables other than the phone... The quality of BT (distance) to the phone, quality of the data connection on the phone, speed of the server, etc, etc, etc.... That's the fun of programming stuff that talks to a website. Much of that path is COMPLETELY out of your control! Just make sure you handle the possible error conditions!

    In the case of something like a weather app/widget, you also have to handle when you get a valid json message with an error message like "no available weather stations"... (you're talking to the server just fine, but the server doesn't have the data you want)