Open jmgeffroy opened 2 years ago
First tests are disappointing from a performance point of view. The reason is that "you shouldn't do any heavy processing inside shouldInterceptRequest, as it is a synchronous call (albeit on another thread). Calls for all network requests are processed on the same thread so blocking for one request will cause all of the other requests to be blocked as well" (source). So we should spawn isolates.
Putting this on hold, and implementing isolates in the server version
note and bookmark not work on Android 6 because paginationInfo and currentSpineItemContext is null. related to this issue?
Yes. related. Bloc doesn't add data anymore. You should manually set paginationInfo with the position.
Removing the HTTP server has a lot of positive consequences:
This performance boost can easily be perceived when navigating with the ToC or progressbar in a book which contains its own fonts, or many image assets. In this area:
For Iridium, we don't need to take care of Android <= 6, but we'll maintain the ability to start the HTTP server for different usages, such as client-server deployments (some adaptations will be required for his use-case but are worth investigating).
Thanks to the migration to Flutter InAppWebView, we have everything we need: https://pub.dev/documentation/flutter_inappwebview/latest/flutter_inappwebview/WebView/onLoadResourceCustomScheme.html
onLoadResourceCustomScheme
is anInAppWebView
cross-platform option, so it should be OK on both Android and iOS...Note: See in Bookari (Mantano private repo)
EpubWebViewClient.shouldInterceptRequest
Epub3WebViewFragment.mustRunServer
See also: