Replies: 1 comment
-
500ms sounds a bit much but maybe it's a debug build thing. couldn't you just swap the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey! I am working on communicating between two windows using events. My frontend is built by NextJS with TypeScript. For the main window, it will create a secondary window through an argument (processed by Rust backend), meanwhile parsing in some extra arguments to the secondary window.
For the main window, I tried to establish a handshake. Note that this is a function to handle the creation of the window:
For the secondary window, I have the following:
This works only if I set a Promise on a 0.5s delay, so that it can be retrieved by the backend. Originally, I thought the establishment of a Websocket connection hinders the delay, but apparently it isn't. I tried to put the listener at the very end of initialization, to try to make sure that the listener establishs after the render has finished. However, after some testing, this 0.5s delay is still needed to load the message.
Is it normal to have such a huge latency between multi-window communication in Tauri? If not, is there any suggestions on how to optimize it? I don't want this to always wait for 0.5 seconds to be able to retrieve the request.
Beta Was this translation helpful? Give feedback.
All reactions