From 9aa03c39baa57a0c45ee443973077a1f6acf6fff Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 16 Nov 2021 16:29:31 +0000 Subject: [PATCH] Optimise core memoization of client component props to improve performance significantly --- .../client/src/components/Component.svelte | 194 +++++++++--------- 1 file changed, 100 insertions(+), 94 deletions(-) diff --git a/packages/client/src/components/Component.svelte b/packages/client/src/components/Component.svelte index e3e4502a10..d0029f5b17 100644 --- a/packages/client/src/components/Component.svelte +++ b/packages/client/src/components/Component.svelte @@ -4,7 +4,7 @@ -{#key renderKey} - {#if constructor && settings && (visible || inSelectedPath)} - - -
- - {#if children.length} - {#each children as child (child._id)} - - {/each} - {:else if emptyState} - - {:else if isBlock} - - {/if} - -
- {/if} -{/key} +{#if constructor && cachedSettings && (visible || inSelectedPath)} + + +
+ + {#if children.length} + {#each children as child (child._id)} + + {/each} + {:else if emptyState} + + {:else if isBlock} + + {/if} + +
+{/if}