Repository navigation
Commit b60e855
authored
Developer playground: compare Lambda before and after optimization (#8636)
* Developer playground: Add lambda views before and after optimisation, including diffs
Signed-off-by: Florian Hammerschmidt <florianh89@gmail.com>
* Changelog
Signed-off-by: Florian Hammerschmidt <florianh89@gmail.com>
* Cache playground Lambda diffs and bound token work by block
Keep the Lambda view mounted, cache its rendered comparison by input text, and render collapsed context only when expanded. Preserve expansion for unchanged regions across edits.
Count shared edges once in the line budget, prioritize atoms in token alignment, and admit whole changed blocks before charging the shared token budget. Cover the algorithm and rendering regressions, and document the API v9 capture boundary.
Signed-off-by: Florian Hammerschmidt <florianh89@gmail.com>
* Defer hidden Lambda updates and debounce comparisons (#8636)
Keep the Before and After dumps unchanged while the Lambda view is hidden.
Opening the view reads the latest compiler result. While Diff is open, wait
200 ms after the latest changed result before replacing its comparison;
opening Diff remains immediate. Leaving Diff or unmounting cancels its timer.
Review: Address cknitt's two non-blocking follow-ups. Regression tests cover
hidden panels catching up, consecutive edits, cancellation on tab switches,
and expanded context surviving the delayed update.
Validation: All 36 developer playground tests, the native compiler suites,
the browser compiler bundle tests, production Vite build, OCaml/ReScript/JS
format checks, and changelog validation pass after rebasing onto b7c67d2.
Signed-off-by: Florian Hammerschmidt <florianh89@gmail.com>
* Reuse hidden Lambda panels after compile errors (#8636)
Give the cached panel input an identity equality check so repeated errors
on the Lambda tab do not notify the unchanged Before and After panels.
Review: Address cknitt's final non-blocking follow-up. The regression test
reproduces the After panel being rebuilt without this check, verifies reuse
across repeated errors, and checks recovery when compilation succeeds.
Validation: All 37 developer playground tests, the production Vite build,
and the changed files' ReScript/JavaScript format checks pass.
Signed-off-by: Florian Hammerschmidt <florianh89@gmail.com>
* Publish Lambda panel snapshots only while visible (#8636)
Keep the visible panel snapshot in a signal updated by an owned effect.
Repeated compile errors leave the signal untouched, so neither hidden
panel is invalidated. Showing the Lambda tab publishes the latest input.
Why: The locked rescript-signals 3.1.1 still invalidates downstream
computeds despite panelInput's equality check. The local install used
3.1.4 and missed this behavior. Reproduced the CI failure with 3.1.1;
the existing panel-reuse regression now passes on the locked version.
Validation: All 37 playground tests pass with Node 22.23.3 and the locked
rescript-signals 3.1.1. The playground compiler build, production Vite
build, ReScript formatting, and diff checks pass.
Signed-off-by: Florian Hammerschmidt <florianh89@gmail.com>
---------
Signed-off-by: Florian Hammerschmidt <florianh89@gmail.com>1 parent dc2f6fb commit b60e855
17 files changed
Lines changed: 1263 additions & 18 deletions
File tree
- changes
- compiler
- core
- jsoo
- packages
- dev-playground
- scripts
- src
- playground
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
431 | 443 | | |
432 | 444 | | |
433 | 445 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | | - | |
| 257 | + | |
| 258 | + | |
258 | 259 | | |
259 | 260 | | |
260 | 261 | | |
| |||
329 | 330 | | |
330 | 331 | | |
331 | 332 | | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
332 | 336 | | |
333 | 337 | | |
334 | 338 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
57 | | - | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
670 | 671 | | |
671 | 672 | | |
672 | 673 | | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
673 | 683 | | |
674 | | - | |
| 684 | + | |
| 685 | + | |
675 | 686 | | |
676 | 687 | | |
677 | 688 | | |
| |||
728 | 739 | | |
729 | 740 | | |
730 | 741 | | |
731 | | - | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
732 | 751 | | |
733 | 752 | | |
734 | 753 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
0 commit comments