Performance: Tauri IPC vs React Native JSI #11915
Replies: 2 comments 1 reply
-
Tauri has a serialization-free ipc in v2 too but it still uses the fetch api (without actually hitting the network) so there's a bit of a delay. A user on discord did some non-scientific benchmark for the binary ipc and got ~5ms on macOS but ~200ms on Windows (that 100% used to be better so idk what's going on there), for 10mb of data. With the currently used system webviews i believe that we can't improve it much further. Only the windows webview supports shared memory but webview2 users reported that it's weirdly slow (also ignoring that it's not exactly trivial to turn that into a usable api). If that's fixed we'd still be left with no macos/linux/android/ios support. There are also sync webview apis that sound similar-ish to JSI (exposing a rust interface to js) but it's not really fitted for large data transfers either. |
Beta Was this translation helpful? Give feedback.
-
Thanks @FabianLars. With that in mind what is the recommended path for large data transfers over the IPC? i.e. Transferring image data, large byte arrays etc? |
Beta Was this translation helpful? Give feedback.
-
Hello! 👋 I’m currently evaluating Tauri to replace React Native for a cross platform iOS, Android and Windows app.
Is the performance of Tauri’s IPC a bottleneck for high-performance applications? E.g. Passing large data payloads from SQL over the IPC is reported to be slow.
The Reactive Native Bridge (legacy) uses a similiar design where data crossing the bridge must be serialized/deserialized, however the new JSI facilitates direct communication between JavaScript and native code bypassing any need for data serialization.
Putting aside architectural differences and security concerns, is there any way of achieving similar performance with Tauri's IPC?
Beta Was this translation helpful? Give feedback.
All reactions