Skip to content

Commit dc0fd9f

Browse files
authored
Merge pull request #4872 from udecode/table-perf-selection
2 parents 9842565 + 37da980 commit dc0fd9f

23 files changed

+1983
-617
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@platejs/table': patch
3+
---
4+
5+
- Reduce large-table selection latency by deriving reactive table selection from editor selectors, keeping selected-cell DOM sync at the table root, and avoiding plugin-store writes on every `set_selection`.

.claude/docs/table/block-selection-core-migration-design-2026-03-12.md

Lines changed: 0 additions & 184 deletions
This file was deleted.

.claude/docs/table/dev-table-perf-performance-2026-03-10.md

Lines changed: 0 additions & 50 deletions
This file was deleted.

.claude/docs/table/dev-table-perf-performance-2026-03-12.md renamed to .claude/docs/table/table-perf-benchmark-input-snapshot.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
- Browser: Playwright + Chromium `138.0.7204.15`
1010
- Page accessibility check: confirmed `/dev/table-perf` loads via `agent-browser`
1111

12-
## Sampling Method
12+
## Sampling
1313

1414
- Read `apps/www/src/app/dev/table-perf/page.tsx`, confirmed the page has two built-in tests:
1515
- Benchmark: `5` warmup + `20` measured remount iterations
@@ -45,15 +45,3 @@
4545
| Input Latency | P95 | 52.70 ms |
4646
| Input Latency | Min | 28.00 ms |
4747
| Input Latency | Max | 61.60 ms |
48-
49-
## Conclusion
50-
51-
- The `40 x 40` remount benchmark is still in the high-cost range, with a mean of ~`841 ms`.
52-
- The `40 x 40` input latency mean is ~`41 ms`, median ~`39 ms`, well below the `100+ ms` threshold where noticeable lag occurs.
53-
- This snapshot is better suited for tracking large-table input performance; if the focus shifts to resize/hover interactions, a separate drag/hover profiling session is recommended.
54-
55-
## Interpretation Notes
56-
57-
- `Initial render`, `Re-render count`, `Last render`, and `Avg render / Median / P95` come from the left-side Metrics panel.
58-
- `Benchmark Results` are the remount benchmark statistics.
59-
- `Input Latency` results do not auto-clear when switching presets or clicking `Generate Table`; re-run after changing configuration.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# dev/table-perf Performance Snapshot
2+
3+
## Environment
4+
5+
- Page route: `/dev/table-perf`
6+
- App: `apps/www`
7+
- Metric group: `Table Selection Latency`
8+
- Table size: `40 x 40` (`1600` cells)
9+
- Selected cells: `9`
10+
- Injected delay: `0 ms`
11+
12+
## Results
13+
14+
### Baseline
15+
16+
| Category | Metric | Value |
17+
| --- | --- | ---: |
18+
| Table Selection Latency | Selected cells | 9 |
19+
| Table Selection Latency | Injected delay | 0.00 ms |
20+
| Table Selection Latency | Mean | 425.00 ms |
21+
| Table Selection Latency | Median | 424.60 ms |
22+
| Table Selection Latency | P95 | 477.90 ms |
23+
| Table Selection Latency | Min | 368.90 ms |
24+
| Table Selection Latency | Max | 489.50 ms |
25+
26+
### Current
27+
28+
| Category | Metric | Value |
29+
| --- | --- | ---: |
30+
| Table Selection Latency | Selected cells | 9 |
31+
| Table Selection Latency | Injected delay | 0.00 ms |
32+
| Table Selection Latency | Mean | 174.62 ms |
33+
| Table Selection Latency | Median | 174.00 ms |
34+
| Table Selection Latency | P95 | 187.10 ms |
35+
| Table Selection Latency | Min | 140.20 ms |
36+
| Table Selection Latency | Max | 214.10 ms |
37+
38+
## Comparison
39+
40+
- Mean: `425.00 -> 174.62 ms` (`-250.38 ms`, `-58.9%`)
41+
- Median: `424.60 -> 174.00 ms` (`-250.60 ms`, `-59.0%`)
42+
- P95: `477.90 -> 187.10 ms` (`-290.80 ms`, `-60.8%`)
43+
- Min: `368.90 -> 140.20 ms` (`-228.70 ms`, `-62.0%`)
44+
- Max: `489.50 -> 214.10 ms` (`-275.40 ms`, `-56.3%`)

.github/workflows/registry.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ jobs:
4040
steps:
4141
- name: 📥 Checkout Repo
4242
uses: actions/checkout@v4
43+
with:
44+
fetch-depth: 0
4345

4446
- name: ♻️ Setup Node.js
4547
uses: actions/setup-node@v4
@@ -67,6 +69,14 @@ jobs:
6769
TEMPLATE_SKIP_VERIFY: 'true'
6870
run: pnpm templates:update --local
6971

72+
- name: 📦 Override templates with local workspace packages
73+
env:
74+
TEMPLATE_LOCAL_PACKAGE_BASE_REF: origin/${{ github.base_ref }}
75+
run: |
76+
node tooling/scripts/prepare-local-template-packages.mjs \
77+
templates/plate-template \
78+
templates/plate-playground-template
79+
7080
- name: ✅ Run template CI
7181
run: |
7282
cd templates/plate-template

apps/www/public/r/table-node.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)