Looks like ResourceProvider performRequest(request: NSURLRequest): Pair<NSData, NSURLResponse> runs on the main thread due to:
mainScope = CoroutineScope(Dispatchers.Main + SupervisorJob())
in
https://github.com/pegasystems/constellation-mobile-sdk/blob/master/engine-webview/src/iosMain/kotlin/com/pega/constellation/sdk/kmp/engine/webview/ios/WKWebViewBasedEngine.kt#L90
This means that the performRequest is also handled on iOS main thread ( NSThread.isMainThread returns true ), which might lag and it is not ideal.
Any plans to change this?
Looks like ResourceProvider performRequest(request: NSURLRequest): Pair<NSData, NSURLResponse> runs on the main thread due to:
mainScope = CoroutineScope(Dispatchers.Main + SupervisorJob())
in
https://github.com/pegasystems/constellation-mobile-sdk/blob/master/engine-webview/src/iosMain/kotlin/com/pega/constellation/sdk/kmp/engine/webview/ios/WKWebViewBasedEngine.kt#L90
This means that the performRequest is also handled on iOS main thread ( NSThread.isMainThread returns true ), which might lag and it is not ideal.
Any plans to change this?