perf: eliminate layout thrashing and array allocations during drawing (#14)
This commit is contained in:
@@ -28,7 +28,8 @@ function sceneFromEditor(
|
||||
files: BinaryFiles,
|
||||
): ScenePayload {
|
||||
return {
|
||||
elements: [...elements],
|
||||
// Excalidraw passes immutable arrays, avoid copying it on every onChange event
|
||||
elements: elements as unknown[],
|
||||
appState: appState as unknown as Record<string, unknown>,
|
||||
files: files as unknown as Record<string, unknown>,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user