fix: Async loading of resources for tauri protocol#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 a5730c9There are 10 changes which include tauri with minor, @tauri-apps/api with minor, tauri-macos-sign with patch, tauri-build with patch, tauri-runtime with minor, tauri-runtime-wry with minor, tauri-bundler with minor, tauri-cli with minor, @tauri-apps/cli with minor, tauri-utils 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 |
|
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 🙏 |
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.