Is there a faster way to send data from rust to webview? #5511
Replies: 2 comments 6 replies
-
Sending this much data will probably always be problematic. Btw, try comparing debug vs release mode, there should be a relatively big difference. The only built-in alternative would be custom protocols https://docs.rs/tauri/latest/tauri/struct.Builder.html#method.register_uri_scheme_protocol. Here's an example app using it for image data: https://github.com/JonasKruckenberg/pisano/ - Our new IPC will very likely build on that same system and we're trying to implement streaming support too. Other than that there are only separate things like hosting a localhost http or ws server :/ |
Beta Was this translation helpful? Give feedback.
-
I found Medium article "Practice Rust and TAURI: Make an Image Viewer #4" quite useful. |
Beta Was this translation helpful? Give feedback.
-
In our use case, we need send a large set of dynamic data(about 200,000 rows) from rust to webview repeatedly.
We use window.eval right now, it takes more than 16 seconds to finish data transfer. Even worse, the UI will be blocked in the meantime.
Just clone the repo to run the demo:
cd tauri-examples/from-rust-to-webview/ && npm install --verbose && npm run tauri dev
Is there a faster way to send data from rust to webview?
Beta Was this translation helpful? Give feedback.
All reactions