Feat: Add scope to event handlers#248
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
⚪ No Meaningful Change for
|
| metric | regression | prior peak | likely candidates |
|---|---|---|---|
krausest:replace-1k |
3% | e0b4a20 |
60f4a5e |
⚪ No Change (21)
Metrics where this PR measured within ±2% of main — no meaningful performance change detected.
| metric | Change |
|---|---|
build-html-string-10k |
-1.1% – +0.6% |
todo:bulk-add-500 |
+0.0% – +1.1% |
krausest:clear-10k |
+0.3% – +1.9% |
todo:clear-completed-250 |
-0.8% – +1.0% |
krausest:create-10k |
-0.0% – +0.8% |
dom-walker-1000x15 |
-1.0% – +1.3% |
each-100 |
-0.5% – +1.0% |
each-100-mount |
-0.8% – +1.0% |
template:each-mount-1000 |
-1.9% – -0.6% |
todo:edit-start-10 |
-0.9% – +0.8% |
expr-lisp-50k |
-1.5% – +1.2% |
todo:filter-cycle-20 |
+0.1% – +1.4% |
helper-100-mount |
-1.2% – +0.7% |
todo:remove-50-front |
-1.9% – +1.9% |
template:snippet-args-per-key-100x500 |
-0.7% – +1.2% |
template:subtemplate-data-blob-100 |
-0.1% – +1.7% |
template:subtemplate-helpers-heavy-100x500 |
-1.6% – +1.1% |
template:subtemplate-helpers-light-100x500 |
-1.4% – +1.4% |
template:subtemplate-reactive-data-100x500 |
-0.6% – +1.3% |
template:subtemplate-shorthand-props-100x500 |
-1.4% – +1.4% |
todo:toggle-all-200 |
+0.5% – +1.1% |
🔍 Unsure (28)
Too Fast to Measure Precisely (28)
On benches this short, OS jitter, GC, and JIT pauses drown out anything under 4%. Bigger changes than that still show up.
| metric | Change | Test Time | Expected Noise |
|---|---|---|---|
template:active-indicator-200 |
-2.5% – +1.0% | ~34ms | ±6% |
template:active-indicator-nested-200 |
-2.1% – +4.7% | ~21ms | ±11% |
todo:add-20 |
-2.1% – +1.3% | ~11ms | ±2% |
krausest:append-1k |
-2.5% – +2.9% | ~53ms | ±7% |
krausest:create-1k |
-3.5% – +0.4% | ~46ms | ±3% |
todo:edit-cycle-5 |
-2.3% – +1.1% | ~65ms | ±4% |
expr-js-10k |
-0.4% – +2.2% | ~19ms | ±6% |
expr-simple-100k |
-1.1% – +2.4% | ~22ms | ±8% |
helper-100-state-change-1k |
-0.7% – +2.3% | ~4ms | ±7% |
todo:remove-50-back |
+0.4% – +2.3% | ~5ms | ±2% |
todo:remove-50-middle |
-4.0% – +2.7% | ~7ms | ±9% |
todo:remove-first-100 |
-0.8% – +4.2% | ~14ms | ±6% |
todo:remove-last-100 |
-0.8% – +2.4% | ~14ms | ±3% |
todo:remove-middle-100 |
-0.2% – +9.2% | ~13ms | ±12% |
krausest:remove-row-back-100 |
-0.7% – +4.7% | ~15ms | ±7% |
krausest:remove-row-front-20 |
-3.5% – +2.6% | ~5ms | ±9% |
krausest:remove-row-middle-20 |
-2.6% – +5.5% | ~3ms | ±6% |
todo:rename-500 |
-5.5% – +4.6% | ~18ms | ±12% |
krausest:replace-1k |
+0.2% – +2.7% | ~59ms | ±3% |
krausest:select-40 |
-3.1% – +3.3% | ~3ms | ±9% |
template:snippet-in-subtemplate-100x1k |
-2.1% – +1.6% | ~21ms | ±6% |
template:stable-ref-mutate-500 |
-3.6% – +1.5% | ~14ms | ±9% |
krausest:swap-rows-20 |
-3.0% – +2.6% | ~7ms | ±4% |
todo:toggle-100 |
-0.1% – +7.8% | ~13ms | ±10% |
todo:toggle-first-100 |
-2.3% – +3.2% | ~15ms | ±7% |
todo:toggle-last-100 |
-1.2% – +3.5% | ~15ms | ±6% |
todo:toggle-middle-100 |
-1.5% – +3.6% | ~13ms | ±8% |
krausest:update-10th-50 |
-0.7% – +3.1% | ~15ms | ±5% |
📖 Bench glossary (40 metrics)
| metric | what it tests |
|---|---|
krausest:append-1k |
Appends 1000 new rows onto an existing 1000-row table. |
krausest:clear-10k |
Clears a 10000-row table back to empty in a single operation. |
krausest:create-10k |
Renders a fresh 10000-row table into an empty parent at ten times the create-1k scale. |
krausest:create-1k |
Renders a fresh 1000-row table into an empty parent. |
krausest:remove-row-back-100 |
Removes the last row 100 times from a 1000-row table, with no other rows needing to move. |
krausest:remove-row-front-20 |
Removes the first row 20 times from a 1000-row table, with all remaining rows sliding up each time. |
krausest:remove-row-middle-20 |
Removes the middle row 20 times from a 1000-row table, with the rows below it sliding up each time. |
krausest:replace-1k |
Replaces 1000 rows with a fresh 1000-row set, diffing the keyed list against a populated table. |
krausest:select-40 |
Highlights one row at a time across 40 rows so only the previous and newly highlighted rows update. |
krausest:swap-rows-20 |
Swaps the second and second-to-last rows in a 1000-row table, repeated 20 times. |
krausest:update-10th-50 |
Updates the label on every tenth row of a 1000-row table, looped 50 times to lift the work above noise. |
template:active-indicator-200 |
Cycles selectedId across 200 list items. Only the previously and newly active items update their class. |
template:active-indicator-nested-200 |
Cycles currentUrl through 50 leaf urls in a 5×10×4 nav. Only the previously and newly active leaves should update their… |
template:each-mount-1000 |
Mounts a fresh 1000-item each block with five-field items so per-record allocation cost dominates the wall clock. |
template:snippet-args-per-key-100x500 |
Mutates one snippet arg's source across 100 invocations, 500 cycles. Adjacent no-signal expressions stay quiet. |
template:snippet-in-subtemplate-100x1k |
Mutates one subtemplate prop's source across 25 cards each invoking 4 inner snippets, 1000 cycles. Snippet bodies shoul… |
template:stable-ref-mutate-500 |
Replaces one item by index in a 500-item list across 100 cycles. Only that item's expressions re-render. |
template:subtemplate-data-blob-100 |
Mutates one field inside data=expression on 100 children. Every child re-renders by design. |
template:subtemplate-helpers-heavy-100x500 |
100 subtemplates, 4 inner bindings where three call helpers shaped like userland reality — Intl.NumberFormat, Array.fin… |
template:subtemplate-helpers-light-100x500 |
100 subtemplates, 4 inner bindings each calling formatDate / classIf / capitalize, 500 cycles. Mutates one source signa… |
template:subtemplate-reactive-data-100x500 |
Mutates one verbose reactiveData field across 100 child subtemplates, 500 cycles. Only the changed field re-evaluates. |
template:subtemplate-shorthand-props-100x500 |
Mutates one shorthand prop's source across 100 child subtemplates, 500 cycles. Only that prop re-evaluates. |
todo:add-20 |
Appends 20 todo items one at a time, like a user typing entries in a row. |
todo:bulk-add-500 |
Renders 500 todo items added at once from a single data load. |
todo:clear-completed-250 |
Clears 250 completed items from a 500-item list in one action, like clicking clear completed. |
todo:edit-cycle-5 |
Runs 5 full edit-then-save cycles on different items, like editing a row and saving it. |
todo:edit-start-10 |
Enters edit mode on 10 different items in a row, like double-clicking each one. |
todo:filter-cycle-20 |
Cycles through active, completed, and all filters 20 times on a 100-item list. |
todo:remove-50-back |
Deletes 50 items from the end of a 100-item list, one click at a time. |
todo:remove-50-front |
Deletes 50 items from the front of a 100-item list, one click at a time. |
todo:remove-50-middle |
Deletes 50 items from the middle of a 100-item list, one click at a time. |
todo:remove-first-100 |
Deletes the first item 100 times from a 200-item list, with remaining items moving up each time. |
todo:remove-last-100 |
Deletes the last item 100 times from a 200-item list, with no other items needing to move. |
todo:remove-middle-100 |
Deletes the middle item 100 times from a 200-item list, walking halfway through to find each target. |
todo:rename-500 |
Renames items in a 100-item list 500 times via single-field setProperty without editingId co-fires. |
todo:toggle-100 |
Cycles through the first 10 items 10 times each, like a user toggling items repeatedly down a list. |
todo:toggle-all-200 |
Toggles all 100 items completed and back across 200 cycles via the master checkbox. |
todo:toggle-first-100 |
Toggles the first item in a 100-item list 100 times, alternating completed on and off. |
todo:toggle-last-100 |
Toggles the last item in a 100-item list 100 times, alternating completed on and off. |
todo:toggle-middle-100 |
Toggles a middle item in a 100-item list 100 times, alternating completed on and off. |
Sample size: 80 floor / 280 max · Noise floor: ±2% · Timeout: 3min · Wall-clock: 12m03s
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Event handlers'
datanow includes the template vars at the event target — each item vars, subtemplate args, snippet args, async values:Removes the data-id round trip for list handlers. Template vars merge below data attributes and event.detail, so existing handlers keep their values.
Additional Changes
list-event-datadocs exampleRisk
5/10
The data argument every event handler receives now merges template vars below its existing sources — all event handling flows through changed code.