Is tauri::ipc::Response slower after build? #13841
-
I noticed that tauri::ipc::Response is slower after build, is this a bug? System: MacOS 15.5, CPU: M4 Code: #[tauri::command]
pub async fn capture_screen(webview_window: tauri::WebviewWindow) -> tauri::ipc::Response {
let masks_arc = {
let mut app = Application::global().lock().unwrap();
app.get_module("screenshot")
.and_then(|s| s.as_any().downcast_ref::<ScreenShotter>())
.map(|screenshot| screenshot.masks.clone())
};
let image = if let Some(masks_arc) = masks_arc {
let masks = masks_arc.lock().await;
masks.get(webview_window.label()).cloned()
} else { None };
tauri::ipc::Response::new(image.unwrap_or_default())
} When use I just replaced |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
hmm i don't see why that would be the case. The IPC should work the same 🤔 Not impossible of course since the security checks may be a bit different but i don't see how that could end up in such a difference. |
Beta Was this translation helpful? Give feedback.
-
Can you give WebSocket a try? It might be much faster than invoke! |
Beta Was this translation helpful? Give feedback.
I used
build --release
and found a key error message in dev-tools:My problem can be solved by adding below content to
tauri.conf.json
: