Replies: 5 comments 5 replies
-
Types of bottleneck, use-casesFor reference, testing, reproducing. If you have / know of a particular use-case and which type of bottleneck you're running up against, do share here. Some ideas: Data volume / bandwidth
Throughput / large number of messages
Latency
|
Beta Was this translation helpful? Give feedback.
-
A small note here: I strongly believe that addressing the IPC performance bottleneck is too important to wait for wider adoption on Linux, and, additionally, WebView2 might soon support zero-copy messaging, something we would be stupid not to take advantage of. This means going forward, Tauri will have to have a number of strategies, falling back to the current slow implementation on systems that are still stuck on old webkitgtk versions. The current feature matrix would then look a bit like this:
We should keep this in mind when designing the new IPC API, and abstract these strategies in a way where we can phase out the use of PS: The story on linux might even be more complicated than this, as support for the new IPC features not only requires Headers, but the request Body too (which afaik has not received any work yet right?) |
Beta Was this translation helpful? Give feedback.
-
@JonasKruckenberg to cite from your tauri-bindgen readme:
|
Beta Was this translation helpful? Give feedback.
-
I feel like 'the coming months' have come and gone, any info on this? |
Beta Was this translation helpful? Give feedback.
-
Just a curiosity about this. Documentation about these custom protocol handlers seems to be centered around an HTTP-style single-request-to-single-response pattern. What if I want to do something like streaming raw binary data continuously from my backend to a webview, for an extended time (i.e. the lifetime of the app), in the style of WebSockets? Is there any workaround you can think of for this in Tauri v2? Right now I am looking at using the raw Windows SharedBuffer APIs directly, but I am hoping that there is an easier solution than that because it looks daunting 😄 (and is not cross-platform) |
Beta Was this translation helpful? Give feedback.
-
While @JonasKruckenberg working on tauri-bindgen, I feel like we should have a place gather the summary on our current status. I'll try to use this discussion as experiement.
Tauri's invoke and command feature have a main bottleneck which is parameters and return values are serialized around strings. This is the restriction from webview libraries on different platforms. I wrote down the summary in tauri-apps/wry#767. In that issue, I also brought up some possible improvements we could make in the near future.
For now, if you really want to maximize the performance, I think you can register a custom protocol by register_uri_scheme_protocol. Read headers from the request as parameters and return what javascript in the browser wants. Note that on Linux, this requires webkit2gtk 2.36 which is not supported by ubuntu 18.04. Part of reasons we can't offer certain API around it in v1.
Beta Was this translation helpful? Give feedback.
All reactions