mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-27 23:28:12 +08:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user