Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lit-html] Allow undefined to be passed to the ref() directive #3968

Merged
merged 2 commits into from Jun 22, 2023

Conversation

justinfagnani
Copy link
Collaborator

Fixes #3965

ref() already handled undefined refs correctly, so this is a one-char change.

@changeset-bot
Copy link

changeset-bot bot commented Jun 21, 2023

🦋 Changeset detected

Latest commit: 514bd9b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
lit-html Patch
lit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Jun 21, 2023

📊 Tachometer Benchmark Results

Summary

nop-update

  • lit-html-kitchen-sink: unsure 🔍 -4% - +14% (-1.12ms - +3.59ms)
    this-change vs tip-of-tree

render

  • lit-element-list: 94.09ms - 99.79ms
  • lit-html-kitchen-sink: unsure 🔍 -7% - +7% (-3.20ms - +2.90ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -7% - +6% (-0.84ms - +0.77ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -3% - +3% (-2.05ms - +2.09ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -3% - +2% (-1.67ms - +1.54ms)
    this-change vs tip-of-tree

update

  • lit-element-list: 1165.64ms - 1197.50ms
  • lit-html-kitchen-sink: unsure 🔍 -2% - +7% (-2.46ms - +6.64ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -6% - +1% (-20.55ms - +2.79ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -3% - +3% (-4.62ms - +4.97ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -1% - +2% (-15.88ms - +23.11ms)
    this-change vs tip-of-tree

update-reflect

  • lit-element-list: 1096.08ms - 1126.75ms
  • reactive-element-list: unsure 🔍 -1% - +2% (-8.37ms - +26.92ms)
    this-change vs tip-of-tree

Results

lit-element-list

render

VersionAvg timevs
94.09ms - 99.79ms-

update

VersionAvg timevs
1165.64ms - 1197.50ms-

update-reflect

VersionAvg timevs
1096.08ms - 1126.75ms-
lit-html-kitchen-sink

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
40.70ms - 44.93ms-unsure 🔍
-7% - +7%
-3.20ms - +2.90ms
unsure 🔍
-10% - +5%
-4.23ms - +2.11ms
tip-of-tree
tip-of-tree
40.77ms - 45.16msunsure 🔍
-7% - +7%
-2.90ms - +3.20ms
-unsure 🔍
-9% - +5%
-4.14ms - +2.32ms
previous-release
previous-release
41.51ms - 46.24msunsure 🔍
-5% - +10%
-2.11ms - +4.23ms
unsure 🔍
-5% - +10%
-2.32ms - +4.14ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
100.81ms - 107.21ms-unsure 🔍
-2% - +7%
-2.46ms - +6.64ms
unsure 🔍
-7% - +2%
-7.83ms - +2.60ms
tip-of-tree
tip-of-tree
98.69ms - 105.16msunsure 🔍
-6% - +2%
-6.64ms - +2.46ms
-unsure 🔍
-9% - +0%
-9.94ms - +0.53ms
previous-release
previous-release
102.51ms - 110.75msunsure 🔍
-3% - +8%
-2.60ms - +7.83ms
unsure 🔍
-1% - +10%
-0.53ms - +9.94ms
-

nop-update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
25.11ms - 28.95ms-unsure 🔍
-4% - +14%
-1.12ms - +3.59ms
unsure 🔍
-8% - +12%
-2.10ms - +3.17ms
tip-of-tree
tip-of-tree
24.42ms - 27.16msunsure 🔍
-13% - +4%
-3.59ms - +1.12ms
-unsure 🔍
-11% - +6%
-2.96ms - +1.56ms
previous-release
previous-release
24.69ms - 28.29msunsure 🔍
-12% - +8%
-3.17ms - +2.10ms
unsure 🔍
-6% - +12%
-1.56ms - +2.96ms
-
lit-html-repeat

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
12.27ms - 12.98ms-unsure 🔍
-7% - +6%
-0.84ms - +0.77ms
unsure 🔍
-5% - +3%
-0.67ms - +0.44ms
tip-of-tree
tip-of-tree
11.94ms - 13.38msunsure 🔍
-6% - +7%
-0.77ms - +0.84ms
-unsure 🔍
-7% - +6%
-0.91ms - +0.75ms
previous-release
previous-release
12.32ms - 13.16msunsure 🔍
-3% - +5%
-0.44ms - +0.67ms
unsure 🔍
-6% - +7%
-0.75ms - +0.91ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
341.90ms - 359.20ms-unsure 🔍
-6% - +1%
-20.55ms - +2.79ms
unsure 🔍
-6% - +2%
-21.03ms - +7.38ms
tip-of-tree
tip-of-tree
351.60ms - 367.27msunsure 🔍
-1% - +6%
-2.79ms - +20.55ms
-unsure 🔍
-3% - +4%
-11.66ms - +15.78ms
previous-release
previous-release
346.11ms - 368.65msunsure 🔍
-2% - +6%
-7.38ms - +21.03ms
unsure 🔍
-4% - +3%
-15.78ms - +11.66ms
-
lit-html-template-heavy

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
66.43ms - 68.96ms-unsure 🔍
-3% - +3%
-2.05ms - +2.09ms
unsure 🔍
-2% - +4%
-1.04ms - +2.94ms
tip-of-tree
tip-of-tree
66.03ms - 69.31msunsure 🔍
-3% - +3%
-2.09ms - +2.05ms
-unsure 🔍
-2% - +5%
-1.32ms - +3.18ms
previous-release
previous-release
65.20ms - 68.29msunsure 🔍
-4% - +2%
-2.94ms - +1.04ms
unsure 🔍
-5% - +2%
-3.18ms - +1.32ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
152.22ms - 158.93ms-unsure 🔍
-3% - +3%
-4.62ms - +4.97ms
unsure 🔍
-4% - +2%
-6.28ms - +3.28ms
tip-of-tree
tip-of-tree
151.97ms - 158.83msunsure 🔍
-3% - +3%
-4.97ms - +4.62ms
-unsure 🔍
-4% - +2%
-6.51ms - +3.16ms
previous-release
previous-release
153.66ms - 160.48msunsure 🔍
-2% - +4%
-3.28ms - +6.28ms
unsure 🔍
-2% - +4%
-3.16ms - +6.51ms
-
reactive-element-list

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
64.17ms - 66.62ms-unsure 🔍
-3% - +2%
-1.67ms - +1.54ms
unsure 🔍
-3% - +3%
-1.65ms - +1.95ms
tip-of-tree
tip-of-tree
64.42ms - 66.50msunsure 🔍
-2% - +3%
-1.54ms - +1.67ms
-unsure 🔍
-2% - +3%
-1.48ms - +1.90ms
previous-release
previous-release
63.92ms - 66.57msunsure 🔍
-3% - +3%
-1.95ms - +1.65ms
unsure 🔍
-3% - +2%
-1.90ms - +1.48ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
1161.18ms - 1188.10ms-unsure 🔍
-1% - +2%
-15.88ms - +23.11ms
unsure 🔍
-1% - +2%
-12.45ms - +23.58ms
tip-of-tree
tip-of-tree
1156.92ms - 1185.13msunsure 🔍
-2% - +1%
-23.11ms - +15.88ms
-unsure 🔍
-1% - +2%
-16.55ms - +20.45ms
previous-release
previous-release
1157.10ms - 1181.05msunsure 🔍
-2% - +1%
-23.58ms - +12.45ms
unsure 🔍
-2% - +1%
-20.45ms - +16.55ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
1137.97ms - 1162.10ms-unsure 🔍
-1% - +2%
-8.37ms - +26.92ms
unsure 🔍
-1% - +2%
-15.11ms - +18.94ms
tip-of-tree
tip-of-tree
1127.88ms - 1153.64msunsure 🔍
-2% - +1%
-26.92ms - +8.37ms
-unsure 🔍
-2% - +1%
-24.98ms - +10.25ms
previous-release
previous-release
1136.11ms - 1160.13msunsure 🔍
-2% - +1%
-18.94ms - +15.11ms
unsure 🔍
-1% - +2%
-10.25ms - +24.98ms
-

tachometer-reporter-action v2 for Benchmarks

@justinfagnani justinfagnani changed the title Allow undefined to be passed to the ref() directive [lit-html] Allow undefined to be passed to the ref() directive Jun 21, 2023
.changeset/grumpy-stingrays-grab.md Outdated Show resolved Hide resolved
Co-authored-by: Augustine Kim <augustinekim@google.com>
@justinfagnani justinfagnani merged commit 5bb4083 into main Jun 22, 2023
6 of 7 checks passed
@justinfagnani justinfagnani deleted the ref-undefined branch June 22, 2023 01:12
@lit-robot lit-robot mentioned this pull request Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[lit-html] ref() directive should accept undefined
3 participants