perf: Limiting the suggested binding to fix performance issue (#6877)
This commit is contained in:
parent
2b14a5c233
commit
c29f19a88b
@ -7379,6 +7379,9 @@ class App extends React.Component<AppProps, AppState> {
|
|||||||
private maybeSuggestBindingForAll(
|
private maybeSuggestBindingForAll(
|
||||||
selectedElements: NonDeleted<ExcalidrawElement>[],
|
selectedElements: NonDeleted<ExcalidrawElement>[],
|
||||||
): void {
|
): void {
|
||||||
|
if (selectedElements.length > 50) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const suggestedBindings = getEligibleElementsForBinding(selectedElements);
|
const suggestedBindings = getEligibleElementsForBinding(selectedElements);
|
||||||
this.setState({ suggestedBindings });
|
this.setState({ suggestedBindings });
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user