Closed wvq closed 7 months ago
We can't do much in v1 to fix this.
In v2 we've reworked the IPC so it should be much better there.
If the file you want to upload is already on the file system you could use the upload plugin instead which won't have this issue. If it's not on the file system already then it won't help you since the writeFile api will have the same problem.
Also, maybe try using the browser's built-in fetch instead of tauri's http module if the server you're uploading it allows it. This will also not use the IPC and therefore shouldn't block the main thread.
Lastly, try a release build via npm run tauri dev -- --release
or npm run tauri build
which should be way faster, maybe even fast enough for your use case.
Describe the bug
By using fetch api to upload a large file (20mb image), main thread were stucked. can't do anything until upload finished.
Reproduction
No response
Expected behavior
No response
Full
tauri info
outputStack trace
No response
Additional context
No response