perf: load resources of tauri:// protocol asynchronously#15220
Conversation
|
Howdy @FabianLars, could you or someone from the team have a look when you have time? I wanted to also add some notes to |
Package Changes Through 9e2f2f1There are 5 changes which include tauri-utils with patch, tauri with patch, tauri-bundler with patch, tauri-cli with patch, @tauri-apps/cli with patch 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 |
|
I need advice on how to proceed with this PR (+ tauri-apps/wry#1715): it improves improves dev experience on ios (with the Wry changes - also on android) and would be great to have some feedback + get it merged soon. @Legend-Master @lucasfernog @FabianLars could any of you lend me a pair of 👀 & help get these DX speeds ups through? 😊 |
|
What's the best way to get some feedback on these changes and have this PR move forward? We would definitely benefit from having these + wry changes merged and released 🙏 @Legend-Master @lucasfernog @FabianLars |
|
we're at reduced capacity at the moment. we'll get back to you at some point. we'll have to focus on getting the next release out soon for multiple reasons. afterwards we should have be able to get back to you in a timely manner. apologies for the delay 🙏 |
There was a problem hiding this comment.
I wonder how does this help by itself, like isn't the call still waiting on wry's handler? (tauri-apps/wry#1715 should address that, I just wonder what does this do by itself)
And I can't seem to find it load faster with this change either Sorry never mind, this should work on iOS right? Looking at tauri-apps/wry#1715 's description
|
Right, this is iOS only. If I remember correctly other platforms were not affected cause they didn't really support proper custom protocols. With this change we were utilizing our tokio async pool without blocking the pool webview/browser would have for custom protocols. |
tauri:// protocol asynchronously
Summary
Closes #15071
This PR addresses performance issues during development of mobile apps on Tauri. As our bundle grows it seems like the bottleneck often times is not Vite (our bundler/dev server) or the webview itself but rather the assets loader in the Tauri dev server.
After adding a few larger sub-dependencies to our project (e.g. three.js) and having multiple IPC plugin calls on startup from JS world, we ended up in various deadlocks where some assets never get loaded. This comes with a very funky race condition.
In this PR we're moving away from safe_block_on to an async tokio task that uses an existing responder to deliver results.
Testing
I check our app on iOS and with this change it's much much faster. I also checked our app on mac and have not noticed any issues or regressions there.