Calling Parse cloud functions very slow on iOS in mobile network

痴心易碎 提交于 2019-12-11 07:48:33

问题


We are experiencing an issue, that calling parse functions that return some data is very slow on iOS compared to Android. Especially with iOS 8 (8.0.2 and 8.1) and in 3G/LTE network. Sometimes it takes up to 10 seconds until the response is received, while on Android calling the same function always takes < 1 second. It seems that on some older iOS devices it's faster than on the new iPhone 6. We also tested side by side in the same WiFi network with an iPhone 6 and an iPod Touch, and on the iPod Touch it's about 3 times faster.

It's a Swift project for iOS 7 and 8. We are not in production mode yet on Parse, but again, on other platforms the cloud functions return very fast. The data that is being returned is usually very small, just a "few lines" of JSON.

The issue is not reproducible on the simulator. There the same cloud functions return very fast. Also on some older devices hat are connected via a 3G hotspot it's not reproducible.

Code example:

PFCloud.callFunctionInBackground("getSomethingFromParse", withParameters: ["someId" : someId]) { ( response : AnyObject!,  error : NSError!) -> Void in
        if error == nil {
            println(response)

What could be causing this? To us it seems like an issue in the Parse iOS SDK.

UPDATE:

We could track down the issue. It appears when 4G is activated in the mobile network settings of the iPhone. All of our test devices were in a 3G network. But it doesn't seem to affect the performance of other apps.

来源:https://stackoverflow.com/questions/26506480/calling-parse-cloud-functions-very-slow-on-ios-in-mobile-network

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!