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

Ensure renderRoot exists before first update #4387

Merged
merged 5 commits into from
Nov 13, 2023

Conversation

sorvell
Copy link
Member

@sorvell sorvell commented Nov 10, 2023

Fixes #4268. Ensures renderRoot exists before first update. It's created upon first connection by default (so that it exists before controllers' hostConntected), but this change supports early calls to performUpdate/enableUpdating without
depending on connection.

Fixes lit#4268. Ensures `renderRoot` exists before
first update. It's created upon first connection by
default (so that it exists before controllers'
`hostConntected`), but this change supports early
calls to `performUpdate`/`enableUpdating` without
depending on connection.
Copy link

changeset-bot bot commented Nov 10, 2023

🦋 Changeset detected

Latest commit: e9496e2

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

This PR includes changesets to release 3 packages
Name Type
@lit/reactive-element Patch
lit Patch
lit-element 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

Copy link
Contributor

github-actions bot commented Nov 10, 2023

📊 Tachometer Benchmark Results

Summary

nop-update

  • this-change, tip-of-tree, previous-release: faster ✔ 1% - 10% (0.15ms - 1.19ms)
    this-change vs tip-of-tree

render

  • this-change: 48.52ms - 51.29ms
  • this-change, tip-of-tree, previous-release: unsure 🔍 -5% - +1% (-1.03ms - +0.11ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -3% - +1% (-1.01ms - +0.38ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -3% - +1% (-1.14ms - +0.38ms)
    this-change vs tip-of-tree

update

  • this-change: 526.07ms - 538.30ms
  • this-change, tip-of-tree, previous-release: faster ✔ 1% - 11% (0.32ms - 4.81ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -2% - +1% (-1.42ms - +0.92ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -1% - +0% (-6.60ms - +2.22ms)
    this-change vs tip-of-tree

update-reflect

  • this-change: 518.28ms - 532.15ms
  • this-change, tip-of-tree, previous-release: unsure 🔍 -1% - +1% (-6.25ms - +3.45ms)
    this-change vs tip-of-tree

Results

this-change

render

VersionAvg timevs
48.52ms - 51.29ms-

update

VersionAvg timevs
526.07ms - 538.30ms-

update-reflect

VersionAvg timevs
518.28ms - 532.15ms-
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
17.87ms - 18.62ms-unsure 🔍
-5% - +1%
-1.03ms - +0.11ms
faster ✔
1% - 7%
0.13ms - 1.34ms
tip-of-tree
tip-of-tree
18.27ms - 19.13msunsure 🔍
-1% - +6%
-0.11ms - +1.03ms
-unsure 🔍
-5% - +2%
-0.92ms - +0.36ms
previous-release
previous-release
18.51ms - 19.45msslower ❌
1% - 7%
0.13ms - 1.34ms
unsure 🔍
-2% - +5%
-0.36ms - +0.92ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
37.45ms - 40.05ms-faster ✔
1% - 11%
0.32ms - 4.81ms
faster ✔
2% - 13%
0.83ms - 5.73ms
tip-of-tree
tip-of-tree
39.49ms - 43.15msslower ❌
1% - 13%
0.32ms - 4.81ms
-unsure 🔍
-8% - +5%
-3.48ms - +2.06ms
previous-release
previous-release
39.95ms - 44.11msslower ❌
2% - 15%
0.83ms - 5.73ms
unsure 🔍
-5% - +8%
-2.06ms - +3.48ms
-

nop-update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
10.74ms - 11.39ms-faster ✔
1% - 10%
0.15ms - 1.19ms
unsure 🔍
-8% - +1%
-0.99ms - +0.08ms
tip-of-tree
tip-of-tree
11.33ms - 12.14msslower ❌
1% - 11%
0.15ms - 1.19ms
-unsure 🔍
-3% - +7%
-0.37ms - +0.80ms
previous-release
previous-release
11.09ms - 11.94msunsure 🔍
-1% - +9%
-0.08ms - +0.99ms
unsure 🔍
-7% - +3%
-0.80ms - +0.37ms
-
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
34.06ms - 35.04ms-unsure 🔍
-3% - +1%
-1.01ms - +0.38ms
unsure 🔍
-1% - +2%
-0.51ms - +0.80ms
tip-of-tree
tip-of-tree
34.37ms - 35.36msunsure 🔍
-1% - +3%
-0.38ms - +1.01ms
-unsure 🔍
-1% - +3%
-0.19ms - +1.12ms
previous-release
previous-release
33.97ms - 34.84msunsure 🔍
-2% - +1%
-0.80ms - +0.51ms
unsure 🔍
-3% - +1%
-1.12ms - +0.19ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
71.06ms - 72.77ms-unsure 🔍
-2% - +1%
-1.42ms - +0.92ms
unsure 🔍
-2% - +1%
-1.74ms - +1.02ms
tip-of-tree
tip-of-tree
71.36ms - 72.96msunsure 🔍
-1% - +2%
-0.92ms - +1.42ms
-unsure 🔍
-2% - +2%
-1.46ms - +1.23ms
previous-release
previous-release
71.19ms - 73.36msunsure 🔍
-1% - +2%
-1.02ms - +1.74ms
unsure 🔍
-2% - +2%
-1.23ms - +1.46ms
-
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
33.04ms - 33.83ms-unsure 🔍
-3% - +1%
-1.14ms - +0.38ms
unsure 🔍
-1% - +3%
-0.19ms - +0.83ms
tip-of-tree
tip-of-tree
33.17ms - 34.46msunsure 🔍
-1% - +3%
-0.38ms - +1.14ms
-unsure 🔍
-0% - +4%
-0.02ms - +1.43ms
previous-release
previous-release
32.78ms - 33.44msunsure 🔍
-2% - +1%
-0.83ms - +0.19ms
unsure 🔍
-4% - +0%
-1.43ms - +0.02ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
539.15ms - 544.28ms-unsure 🔍
-1% - +0%
-6.60ms - +2.22ms
unsure 🔍
-1% - +1%
-3.06ms - +4.92ms
tip-of-tree
tip-of-tree
540.31ms - 547.49msunsure 🔍
-0% - +1%
-2.22ms - +6.60ms
-unsure 🔍
-0% - +1%
-1.60ms - +7.83ms
previous-release
previous-release
537.72ms - 543.85msunsure 🔍
-1% - +1%
-4.92ms - +3.06ms
unsure 🔍
-1% - +0%
-7.83ms - +1.60ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
538.34ms - 544.80ms-unsure 🔍
-1% - +1%
-6.25ms - +3.45ms
unsure 🔍
-1% - +1%
-3.93ms - +5.77ms
tip-of-tree
tip-of-tree
539.35ms - 546.59msunsure 🔍
-1% - +1%
-3.45ms - +6.25ms
-unsure 🔍
-1% - +1%
-2.80ms - +7.44ms
previous-release
previous-release
537.03ms - 544.27msunsure 🔍
-1% - +1%
-5.77ms - +3.93ms
unsure 🔍
-1% - +1%
-7.44ms - +2.80ms
-

tachometer-reporter-action v2 for Benchmarks

Copy link
Contributor

github-actions bot commented Nov 11, 2023

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

Copy link
Contributor

@AndrewJakubowicz AndrewJakubowicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. This looks good to me. Just some small nits.

The size of Lit will also need to be updated per the comment: #4387 (comment)

.changeset/slow-singers-compare.md Outdated Show resolved Hide resolved
.changeset/slow-singers-compare.md Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file can be deleted please. It's superseded by pink-maps-exercise.md.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@AndrewJakubowicz AndrewJakubowicz merged commit bf551b5 into lit:main Nov 13, 2023
7 checks passed
This was referenced Nov 14, 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.

ReactiveElement: calling performUpdate before an element is in the DOM causes exception
3 participants