Differences between approaches to IPC with large data #12752
-
There seems to be a few approaches I've found to send large data from rust to js.
However they're not exactly well documented, in fact Channels seem to be the only one mentioned in the docs. Information about these seems to be scattered in various github threads. What are the differences between these approaches? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
2 and 3 are essentially the same since the ipc that powers commands uses custom protocols for data transfers. 2 may be a tinyyy bit faster because it has fewer "layers". probably not noticable. 1 can only be slower than 2 and 3 because there's some indirection happening iirc (the sender tells the receiver to pull the data) due to webview api (performance) limitations. it's supposed to still be reasonable fast but there's either a bug or i misunderstood the team because it's a bit slower than expected. |
Beta Was this translation helpful? Give feedback.
2 and 3 are essentially the same since the ipc that powers commands uses custom protocols for data transfers. 2 may be a tinyyy bit faster because it has fewer "layers". probably not noticable.
1 can only be slower than 2 and 3 because there's some indirection happening iirc (the sender tells the receiver to pull the data) due to webview api (performance) limitations. it's supposed to still be reasonable fast but there's either a bug or i misunderstood the team because it's a bit slower than expected.
also apart from performance, this does not sound like a usecase for a channel api wise. they typically only make sense for usecases where you need to push data (more than once).