Skip to content

Change the type of renderRoot to include Element#4254

Merged
rictic merged 7 commits intomainfrom
3.0-render-root-type
Oct 10, 2023
Merged

Change the type of renderRoot to include Element#4254
rictic merged 7 commits intomainfrom
3.0-render-root-type

Conversation

@justinfagnani
Copy link
Copy Markdown
Collaborator

I found a type mismatch between renderRoot and createRenderRoot when removing some unsafe casts.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Oct 3, 2023

🦋 Changeset detected

Latest commit: 571a563

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

This PR includes changesets to release 4 packages
Name Type
@lit/reactive-element Major
lit-element Major
lit Major
@lit-examples/nextjs 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
Copy Markdown
Contributor

github-actions bot commented Oct 3, 2023

📊 Tachometer Benchmark Results

Summary

nop-update

  • this-change, tip-of-tree, previous-release: unsure 🔍 -5% - +13% (-0.93ms - +2.52ms)
    this-change vs tip-of-tree

render

  • this-change: 84.79ms - 88.11ms
  • this-change, tip-of-tree, previous-release: unsure 🔍 -6% - +5% (-2.17ms - +1.79ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -0% - +6% (-0.01ms - +3.52ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -3% - +2% (-2.05ms - +1.18ms)
    this-change vs tip-of-tree

update

  • this-change: 913.41ms - 929.11ms
  • this-change, tip-of-tree, previous-release: unsure 🔍 -8% - +5% (-6.00ms - +3.69ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -3% - +2% (-3.93ms - +2.95ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -1% - +1% (-9.63ms - +9.65ms)
    this-change vs tip-of-tree

update-reflect

  • this-change: 891.98ms - 904.13ms
  • this-change, tip-of-tree, previous-release: unsure 🔍 -1% - +1% (-10.30ms - +7.91ms)
    this-change vs tip-of-tree

Results

this-change

render

VersionAvg timevs
84.79ms - 88.11ms-

update

VersionAvg timevs
913.41ms - 929.11ms-

update-reflect

VersionAvg timevs
891.98ms - 904.13ms-
this-change, tip-of-tree, previous-release

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
32.77ms - 35.71ms-unsure 🔍
-6% - +5%
-2.17ms - +1.79ms
unsure 🔍
-10% - +1%
-3.51ms - +0.43ms
tip-of-tree
tip-of-tree
33.09ms - 35.76msunsure 🔍
-5% - +6%
-1.79ms - +2.17ms
-unsure 🔍
-9% - +1%
-3.22ms - +0.53ms
previous-release
previous-release
34.46ms - 37.09msunsure 🔍
-1% - +10%
-0.43ms - +3.51ms
unsure 🔍
-2% - +9%
-0.53ms - +3.22ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
73.52ms - 78.78ms-unsure 🔍
-8% - +5%
-6.00ms - +3.69ms
unsure 🔍
-12% - +2%
-9.88ms - +1.61ms
tip-of-tree
tip-of-tree
73.24ms - 81.37msunsure 🔍
-5% - +8%
-3.69ms - +6.00ms
-unsure 🔍
-12% - +4%
-9.51ms - +3.55ms
previous-release
previous-release
75.18ms - 85.39msunsure 🔍
-2% - +13%
-1.61ms - +9.88ms
unsure 🔍
-5% - +12%
-3.55ms - +9.51ms
-

nop-update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
19.61ms - 21.82ms-unsure 🔍
-5% - +13%
-0.93ms - +2.52ms
unsure 🔍
-3% - +10%
-0.66ms - +2.02ms
tip-of-tree
tip-of-tree
18.59ms - 21.25msunsure 🔍
-12% - +4%
-2.52ms - +0.93ms
-unsure 🔍
-8% - +7%
-1.64ms - +1.42ms
previous-release
previous-release
19.27ms - 20.79msunsure 🔍
-10% - +3%
-2.02ms - +0.66ms
unsure 🔍
-7% - +8%
-1.42ms - +1.64ms
-
this-change, tip-of-tree, previous-release

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
61.22ms - 63.81ms-unsure 🔍
-0% - +6%
-0.01ms - +3.52ms
unsure 🔍
-1% - +5%
-0.29ms - +3.11ms
tip-of-tree
tip-of-tree
59.56ms - 61.96msunsure 🔍
-6% - -0%
-3.52ms - +0.01ms
-unsure 🔍
-3% - +2%
-1.98ms - +1.28ms
previous-release
previous-release
60.01ms - 62.21msunsure 🔍
-5% - +0%
-3.11ms - +0.29ms
unsure 🔍
-2% - +3%
-1.28ms - +1.98ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
137.27ms - 142.03ms-unsure 🔍
-3% - +2%
-3.93ms - +2.95ms
unsure 🔍
-2% - +2%
-2.76ms - +3.38ms
tip-of-tree
tip-of-tree
137.66ms - 142.63msunsure 🔍
-2% - +3%
-2.95ms - +3.93ms
-unsure 🔍
-2% - +3%
-2.35ms - +3.96ms
previous-release
previous-release
137.40ms - 141.28msunsure 🔍
-2% - +2%
-3.38ms - +2.76ms
unsure 🔍
-3% - +2%
-3.96ms - +2.35ms
-
this-change, tip-of-tree, previous-release

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
57.20ms - 59.15ms-unsure 🔍
-3% - +2%
-2.05ms - +1.18ms
unsure 🔍
-4% - +1%
-2.23ms - +0.58ms
tip-of-tree
tip-of-tree
57.33ms - 59.90msunsure 🔍
-2% - +4%
-1.18ms - +2.05ms
-unsure 🔍
-3% - +2%
-2.02ms - +1.24ms
previous-release
previous-release
57.99ms - 60.01msunsure 🔍
-1% - +4%
-0.58ms - +2.23ms
unsure 🔍
-2% - +3%
-1.24ms - +2.02ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
959.22ms - 972.60ms-unsure 🔍
-1% - +1%
-9.63ms - +9.65ms
unsure 🔍
-1% - +1%
-7.59ms - +10.18ms
tip-of-tree
tip-of-tree
958.96ms - 972.84msunsure 🔍
-1% - +1%
-9.65ms - +9.63ms
-unsure 🔍
-1% - +1%
-7.78ms - +10.36ms
previous-release
previous-release
958.78ms - 970.45msunsure 🔍
-1% - +1%
-10.18ms - +7.59ms
unsure 🔍
-1% - +1%
-10.36ms - +7.78ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
949.50ms - 963.57ms-unsure 🔍
-1% - +1%
-10.30ms - +7.91ms
unsure 🔍
-1% - +1%
-5.62ms - +12.87ms
tip-of-tree
tip-of-tree
951.94ms - 963.52msunsure 🔍
-1% - +1%
-7.91ms - +10.30ms
-unsure 🔍
-0% - +1%
-3.52ms - +13.16ms
previous-release
previous-release
946.91ms - 958.92msunsure 🔍
-1% - +1%
-12.87ms - +5.62ms
unsure 🔍
-1% - +0%
-13.16ms - +3.52ms
-

tachometer-reporter-action v2 for Benchmarks

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Oct 3, 2023

The size of lit-html.js and lit-core.min.js are as expected.

@justinfagnani
Copy link
Copy Markdown
Collaborator Author

Oh... Element | ShadowRoot doesn't play nice with lit-html's render() which accepts a HTMLElement | DocumentFragment.

I'll change createRenderRoot() instead to return a HTMLElement | DocumentFragment.

@AndrewJakubowicz
Copy link
Copy Markdown
Contributor

@rictic We'll need to test this change in google3

Base automatically changed from 3.0 to main October 9, 2023 16:54
@rictic rictic merged commit 1040f75 into main Oct 10, 2023
@rictic rictic deleted the 3.0-render-root-type branch October 10, 2023 00:35
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.

3 participants