Skip to content

fix: Async loading of resources for tauri protocol#15220

Open
DeTeam wants to merge 1 commit into
tauri-apps:devfrom
DeTeam:async-assets-loading
Open

fix: Async loading of resources for tauri protocol#15220
DeTeam wants to merge 1 commit into
tauri-apps:devfrom
DeTeam:async-assets-loading

Conversation

@DeTeam
Copy link
Copy Markdown
Contributor

@DeTeam DeTeam commented Apr 10, 2026

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.

@DeTeam DeTeam requested a review from a team as a code owner April 10, 2026 14:15
@DeTeam
Copy link
Copy Markdown
Contributor Author

DeTeam commented Apr 10, 2026

Howdy @FabianLars, could you or someone from the team have a look when you have time?

I wanted to also add some notes to .changes dir, though not exactly sure what to put there 💡

@github-actions
Copy link
Copy Markdown
Contributor

Package Changes Through a5730c9

There 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 Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
@tauri-apps/api 2.10.1 2.11.0
tauri-utils 2.8.3 2.9.0
tauri-macos-sign 2.3.3 2.3.4
tauri-bundler 2.8.1 2.9.0
tauri-runtime 2.10.1 2.11.0
tauri-runtime-wry 2.10.1 2.11.0
tauri-codegen 2.5.5 2.5.6
tauri-macros 2.5.5 2.5.6
tauri-plugin 2.5.4 2.5.5
tauri-build 2.5.6 2.5.7
tauri 2.10.3 2.11.0
@tauri-apps/cli 2.10.1 2.11.0
tauri-cli 2.10.1 2.11.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@DeTeam
Copy link
Copy Markdown
Contributor Author

DeTeam commented Apr 15, 2026

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? 😊

@DeTeam
Copy link
Copy Markdown
Contributor Author

DeTeam commented Apr 20, 2026

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

@FabianLars
Copy link
Copy Markdown
Member

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 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Slow proxy dev server (mobile)

2 participants