Commit 9e122ee
committed
Batch workspace metadata updates on initial load
When subscribing to metadata, backend sends one event per workspace
synchronously. This was causing N re-renders for N workspaces.
Now we batch these updates using queueMicrotask - all synchronous
events are collected and flushed in a single state update after the
current task completes. This reduces 19 re-renders to 1 on startup.1 parent 5743f4b commit 9e122ee
1 file changed
+27
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
44 | 65 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
50 | 72 | | |
51 | 73 | | |
52 | 74 | | |
| |||
0 commit comments