Improve web frontend performance during zooming and panning (#3337)

* WIP debounce frontend ui updates

* Reduce the number of frontend updates performed

* Improve menu bar diffing

* Cleanup in dispatcher

* Fix comment
This commit is contained in:
Dennis Kobert
2025-11-08 14:01:11 +01:00
committed by GitHub
parent 9be207f4c5
commit 72a291d808
6 changed files with 72 additions and 10 deletions
+5 -1
View File
@@ -1045,8 +1045,12 @@ async fn poll_node_graph_evaluation() {
crate::NODE_GRAPH_ERROR_DISPLAYED.store(false, Ordering::SeqCst);
}
// Batch responses to pool frontend updates
let batched = Message::Batched {
messages: messages.into_iter().collect(),
};
// Send each `FrontendMessage` to the JavaScript frontend
for response in messages.into_iter().flat_map(|message| editor.handle_message(message)) {
for response in editor.handle_message(batched) {
handle.send_frontend_message_to_js(response);
}