Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@justinfagnani
Copy link
Collaborator

Fixes #3587

The bug was that FallbackRenderer didn't return undefined from renderShadow() - as a generator it returns an empty iterable. The fix is done by making a default implementation of renderShadow() in ElementRenderer that returns undefined and removing the FallbackRenderer implementation. I did that for other callbacks too and updated some comments.

No updated tests just yet, I'll add that in a bit.

@changeset-bot
Copy link

changeset-bot bot commented Jan 18, 2023

⚠️ No Changeset found

Latest commit: 143fac6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes changesets to release 1 package
Name Type
lit-html Patch

Click here to learn what changesets are, and how to add one.

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

@github-actions
Copy link
Contributor

github-actions bot commented Jan 18, 2023

📊 Tachometer Benchmark Results

Summary

nop-update

  • lit-html-kitchen-sink: unsure 🔍 -7% - +11% (-1.75ms - +2.59ms)
    this-change vs tip-of-tree

render

  • lit-element-list: 74.72ms - 79.57ms
  • lit-html-kitchen-sink: unsure 🔍 -3% - +5% (-1.04ms - +1.58ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -4% - +5% (-0.49ms - +0.58ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -1% - +3% (-0.74ms - +1.41ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -3% - +2% (-1.58ms - +1.03ms)
    this-change vs tip-of-tree

update

  • lit-element-list: 685.22ms - 698.34ms
  • lit-html-kitchen-sink: slower ❌ 0% - 7% (0.21ms - 5.35ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -3% - +3% (-9.26ms - +7.97ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -1% - +1% (-0.82ms - +0.95ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -1% - +0% (-4.50ms - +2.50ms)
    this-change vs tip-of-tree

update-reflect

  • lit-element-list: 686.96ms - 695.07ms
  • reactive-element-list: unsure 🔍 -0% - +0% (-3.45ms - +2.78ms)
    this-change vs tip-of-tree

Results

lit-element-list

render

VersionAvg timevs
74.72ms - 79.57ms-

update

VersionAvg timevs
685.22ms - 698.34ms-

update-reflect

VersionAvg timevs
686.96ms - 695.07ms-
lit-html-kitchen-sink

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
30.02ms - 31.51ms-unsure 🔍
-3% - +5%
-1.04ms - +1.58ms
unsure 🔍
-3% - +5%
-0.87ms - +1.45ms
tip-of-tree
tip-of-tree
29.41ms - 31.58msunsure 🔍
-5% - +3%
-1.58ms - +1.04ms
-unsure 🔍
-5% - +5%
-1.38ms - +1.42ms
previous-release
previous-release
29.59ms - 31.37msunsure 🔍
-5% - +3%
-1.45ms - +0.87ms
unsure 🔍
-5% - +5%
-1.42ms - +1.38ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
77.55ms - 81.13ms-slower ❌
0% - 7%
0.21ms - 5.35ms
unsure 🔍
-3% - +4%
-2.39ms - +2.93ms
tip-of-tree
tip-of-tree
74.72ms - 78.40msfaster ✔
0% - 7%
0.21ms - 5.35ms
-unsure 🔍
-7% - +0%
-5.20ms - +0.18ms
previous-release
previous-release
77.10ms - 81.04msunsure 🔍
-4% - +3%
-2.93ms - +2.39ms
unsure 🔍
-0% - +7%
-0.18ms - +5.20ms
-

nop-update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
23.04ms - 26.49ms-unsure 🔍
-7% - +11%
-1.75ms - +2.59ms
unsure 🔍
-3% - +18%
-0.61ms - +4.01ms
tip-of-tree
tip-of-tree
23.02ms - 25.67msunsure 🔍
-10% - +7%
-2.59ms - +1.75ms
-unsure 🔍
-4% - +15%
-0.75ms - +3.31ms
previous-release
previous-release
21.52ms - 24.61msunsure 🔍
-16% - +2%
-4.01ms - +0.61ms
unsure 🔍
-13% - +3%
-3.31ms - +0.75ms
-
lit-html-repeat

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
11.87ms - 12.65ms-unsure 🔍
-4% - +5%
-0.49ms - +0.58ms
unsure 🔍
-6% - +5%
-0.70ms - +0.64ms
tip-of-tree
tip-of-tree
11.84ms - 12.58msunsure 🔍
-5% - +4%
-0.58ms - +0.49ms
-unsure 🔍
-6% - +5%
-0.73ms - +0.58ms
previous-release
previous-release
11.75ms - 12.83msunsure 🔍
-5% - +6%
-0.64ms - +0.70ms
unsure 🔍
-5% - +6%
-0.58ms - +0.73ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
267.89ms - 280.67ms-unsure 🔍
-3% - +3%
-9.26ms - +7.97ms
unsure 🔍
-1% - +5%
-1.57ms - +14.09ms
tip-of-tree
tip-of-tree
269.15ms - 280.70msunsure 🔍
-3% - +3%
-7.97ms - +9.26ms
-unsure 🔍
-0% - +5%
-0.43ms - +14.24ms
previous-release
previous-release
263.50ms - 272.54msunsure 🔍
-5% - +1%
-14.09ms - +1.57ms
unsure 🔍
-5% - +0%
-14.24ms - +0.43ms
-
lit-html-template-heavy

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
51.36ms - 52.86ms-unsure 🔍
-1% - +3%
-0.74ms - +1.41ms
unsure 🔍
-2% - +2%
-1.05ms - +1.12ms
tip-of-tree
tip-of-tree
51.01ms - 52.55msunsure 🔍
-3% - +1%
-1.41ms - +0.74ms
-unsure 🔍
-3% - +2%
-1.40ms - +0.81ms
previous-release
previous-release
51.28ms - 52.86msunsure 🔍
-2% - +2%
-1.12ms - +1.05ms
unsure 🔍
-2% - +3%
-0.81ms - +1.40ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
105.04ms - 106.16ms-unsure 🔍
-1% - +1%
-0.82ms - +0.95ms
unsure 🔍
-1% - +1%
-0.83ms - +1.14ms
tip-of-tree
tip-of-tree
104.85ms - 106.22msunsure 🔍
-1% - +1%
-0.95ms - +0.82ms
-unsure 🔍
-1% - +1%
-0.97ms - +1.15ms
previous-release
previous-release
104.64ms - 106.25msunsure 🔍
-1% - +1%
-1.14ms - +0.83ms
unsure 🔍
-1% - +1%
-1.15ms - +0.97ms
-
reactive-element-list

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
49.20ms - 51.18ms-unsure 🔍
-3% - +2%
-1.58ms - +1.03ms
unsure 🔍
-2% - +3%
-0.84ms - +1.64ms
tip-of-tree
tip-of-tree
49.62ms - 51.31msunsure 🔍
-2% - +3%
-1.03ms - +1.58ms
-unsure 🔍
-1% - +4%
-0.44ms - +1.80ms
previous-release
previous-release
49.04ms - 50.53msunsure 🔍
-3% - +2%
-1.64ms - +0.84ms
unsure 🔍
-4% - +1%
-1.80ms - +0.44ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
689.69ms - 695.09ms-unsure 🔍
-1% - +0%
-4.50ms - +2.50ms
unsure 🔍
-1% - +0%
-4.37ms - +3.09ms
tip-of-tree
tip-of-tree
691.16ms - 695.62msunsure 🔍
-0% - +1%
-2.50ms - +4.50ms
-unsure 🔍
-0% - +1%
-3.05ms - +3.77ms
previous-release
previous-release
690.45ms - 695.61msunsure 🔍
-0% - +1%
-3.09ms - +4.37ms
unsure 🔍
-1% - +0%
-3.77ms - +3.05ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
720.66ms - 724.62ms-unsure 🔍
-0% - +0%
-3.45ms - +2.78ms
unsure 🔍
-0% - +0%
-3.32ms - +3.28ms
tip-of-tree
tip-of-tree
720.57ms - 725.38msunsure 🔍
-0% - +0%
-2.78ms - +3.45ms
-unsure 🔍
-0% - +1%
-3.26ms - +3.89ms
previous-release
previous-release
720.02ms - 725.30msunsure 🔍
-0% - +0%
-3.28ms - +3.32ms
unsure 🔍
-1% - +0%
-3.89ms - +3.26ms
-

tachometer-reporter-action v2 for Benchmarks

Copy link
Member

@aomarks aomarks left a comment

Choose a reason for hiding this comment

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

Test

@justinfagnani
Copy link
Collaborator Author

@aomarks PTAL, but I can't get the Sauce test runners passing. There's a persistent error about the /home/runner/work/lit/lit/node_modules/saucelabs/build/sc-loader/.sc-v4.8.0/bin/sc file being busy. I've seen this on other branches, but it went away when re-running failed tests. That doesn't seem to be working here.

Copy link
Member

@augustjk augustjk left a comment

Choose a reason for hiding this comment

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

LGTM

@justinfagnani justinfagnani enabled auto-merge (squash) January 28, 2023 02:19
@justinfagnani
Copy link
Collaborator Author

@aomarks tests seem to be ok now

Copy link
Member

@aomarks aomarks left a comment

Choose a reason for hiding this comment

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

Nice!

@justinfagnani justinfagnani merged commit 1d8a38e into main Jan 29, 2023
@justinfagnani justinfagnani deleted the ssr-fallback-renderer branch January 29, 2023 16:55
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.

[labs/ssr] FallbackRenderer incorrectly creates a shadow root

3 participants