fix(android): Speed up async dev assets loading#1715
Conversation
Attempting to speed up assets loading on Android with this
Package Changes Through 22fa8fbThere are 1 changes which include wry with minor Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
Legend-Master
left a comment
There was a problem hiding this comment.
Looks good from my part, still want some opinions from other members though
| @@ -644,7 +644,7 @@ struct WebViewAttributes<'a> { | |||
| /// locate your files in those directories. For more information, see [Loading in-app content](https://developer.android.com/guide/webapps/load-local-content) page. | |||
| /// - iOS: To get the path of your assets, you can call [`CFBundle::resources_path`](https://docs.rs/core-foundation/latest/core_foundation/bundle/struct.CFBundle.html#method.resources_path). So url like `wry://assets/index.html` could get the html file in assets directory. | |||
| pub custom_protocols: | |||
There was a problem hiding this comment.
@lucasfernog We do require Send + Sync in tauri, and this change does reflect what we're actually doing, any thoughts?
https://docs.rs/tauri/latest/tauri/struct.Builder.html#method.register_uri_scheme_protocol
Alternatively, we could send the request to main thread and handle things there
|
This change together with tauri-apps/tauri#15220 can nicely speed things up both modern platforms 😊 just a little nudge/reminder so this PR doesn't get lost, if that's ok @lucasfernog, whenever you have time! |
Looks like on Android besides loading assets sync in the tauri land we also have a single mutex lock point when accessing custom protocol handler. This PR allows releasing the lock sooner by cloning the underlying handler.