GraphiteEditor / GraphiteEditor/Graphite

Upgrade to Svelte 5 and remove slow manual component event delegation

オープン
#1,877 コメント 1 件 リアクション 1 件 担当者 1 名 @Keavon が担当を希望しています GitHub で見る
Performance Web
主要言語
Rust
スター
27.2k
フォーク
1.3k
平均マージ
20時間 5分
マージ済み PR(30日)
57

説明

`LayoutRow.svelte` and `LayoutCol.svelte` each have to manually [delegate events](https://github.com/sveltejs/svelte/issues/2837) and we take the ugly approach of just naming every event for delegation. But as @adamgerhant and I just discovered when debugging a performance issue with creating and destroying a bunch of layers in the Layers panel, it turns out Svelte is creating and destroying an event handler for each and every one of those delegated events, even when nearly all are unused. Removing these quadruples the performance for creating/removing all those layers.

Svelte 5 [allows components to delegate events](https://svelte-5-preview.vercel.app/docs/old-vs-new#forwarding-events). We should aim to upgrade to Svelte 5 and update how those components are doing their event delegation. (Side note: can we also delegate other attributes like `class` and `style` to avoid the hacky way we have many components do that presently?) This should provide a significant frontend performance improvement for all components that utilize LayoutRow and LayoutCol.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。