Skip to content

[labs/ssr] Throw on custom renderRoot#3083

Draft
justinfagnani wants to merge 2 commits intomainfrom
ssr-render-root
Draft

[labs/ssr] Throw on custom renderRoot#3083
justinfagnani wants to merge 2 commits intomainfrom
ssr-render-root

Conversation

@justinfagnani
Copy link
Collaborator

Closes #3080

This is attempting to detect when an element has overridden createRenderRoot() and returned something other than the result of this.attachShadow().

This PR is a WIP draft because:

  • It calls connectedCallback() (like [labs/ssr] Add basic event support #2309) which we have to decide if we can do and how to guard client-side only code if we do.
  • I can't see how to capture the error on the server yet (I can't see any logging in the test server actually)

@changeset-bot
Copy link

changeset-bot bot commented Jun 24, 2022

⚠️ No Changeset found

Latest commit: ab97d4e

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 no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@justinfagnani justinfagnani changed the title Throw on custom renderRoot [labs/ssr] Throw on custom renderRoot Jun 24, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jun 24, 2022

📊 Tachometer Benchmark Results

Summary

nop-update

  • lit-html-kitchen-sink: unsure 🔍 -8% - +8% (-2.03ms - +2.21ms)
    this-change vs tip-of-tree

render

  • lit-element-list: 102.05ms - 105.62ms
  • lit-html-kitchen-sink: unsure 🔍 -8% - +10% (-3.66ms - +4.32ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -5% - +6% (-0.58ms - +0.77ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -2% - +2% (-1.44ms - +1.19ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -4% - +0% (-2.96ms - +0.23ms)
    this-change vs tip-of-tree

update

  • lit-element-list: 956.01ms - 970.90ms
  • lit-html-kitchen-sink: unsure 🔍 -10% - +5% (-12.42ms - +6.23ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -3% - +2% (-9.60ms - +5.74ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -4% - +1% (-4.97ms - +0.93ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -2% - +1% (-15.01ms - +9.83ms)
    this-change vs tip-of-tree

update-reflect

  • lit-element-list: 973.75ms - 985.10ms
  • reactive-element-list: unsure 🔍 -1% - +1% (-8.58ms - +13.64ms)
    this-change vs tip-of-tree

Results

lit-element-list

render

VersionAvg timevs
102.05ms - 105.62ms-

update

VersionAvg timevs
956.01ms - 970.90ms-

update-reflect

VersionAvg timevs
973.75ms - 985.10ms-
lit-html-kitchen-sink

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
42.22ms - 47.61ms-unsure 🔍
-8% - +10%
-3.66ms - +4.32ms
unsure 🔍
-7% - +9%
-2.96ms - +4.04ms
tip-of-tree
tip-of-tree
41.64ms - 47.52msunsure 🔍
-10% - +8%
-4.32ms - +3.66ms
-unsure 🔍
-8% - +9%
-3.48ms - +3.90ms
previous-release
previous-release
42.14ms - 46.60msunsure 🔍
-9% - +7%
-4.04ms - +2.96ms
unsure 🔍
-9% - +8%
-3.90ms - +3.48ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
107.76ms - 120.64ms-unsure 🔍
-10% - +5%
-12.42ms - +6.23ms
unsure 🔍
-8% - +7%
-9.71ms - +8.57ms
tip-of-tree
tip-of-tree
110.56ms - 124.03msunsure 🔍
-6% - +11%
-6.23ms - +12.42ms
-unsure 🔍
-6% - +10%
-6.83ms - +11.88ms
previous-release
previous-release
108.28ms - 121.26msunsure 🔍
-8% - +9%
-8.57ms - +9.71ms
unsure 🔍
-10% - +6%
-11.88ms - +6.83ms
-

nop-update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
25.52ms - 28.32ms-unsure 🔍
-8% - +8%
-2.03ms - +2.21ms
unsure 🔍
-7% - +8%
-1.99ms - +2.12ms
tip-of-tree
tip-of-tree
25.23ms - 28.43msunsure 🔍
-8% - +8%
-2.21ms - +2.03ms
-unsure 🔍
-8% - +8%
-2.22ms - +2.17ms
previous-release
previous-release
25.35ms - 28.36msunsure 🔍
-8% - +7%
-2.12ms - +1.99ms
unsure 🔍
-8% - +8%
-2.17ms - +2.22ms
-
lit-html-repeat

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
12.23ms - 13.25ms-unsure 🔍
-5% - +6%
-0.58ms - +0.77ms
unsure 🔍
-2% - +7%
-0.28ms - +0.88ms
tip-of-tree
tip-of-tree
12.20ms - 13.08msunsure 🔍
-6% - +5%
-0.77ms - +0.58ms
-unsure 🔍
-3% - +6%
-0.32ms - +0.73ms
previous-release
previous-release
12.15ms - 12.72msunsure 🔍
-7% - +2%
-0.88ms - +0.28ms
unsure 🔍
-6% - +3%
-0.73ms - +0.32ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
316.83ms - 327.62ms-unsure 🔍
-3% - +2%
-9.60ms - +5.74ms
unsure 🔍
-5% - +2%
-15.35ms - +5.14ms
tip-of-tree
tip-of-tree
318.70ms - 329.60msunsure 🔍
-2% - +3%
-5.74ms - +9.60ms
-unsure 🔍
-4% - +2%
-13.45ms - +7.10ms
previous-release
previous-release
318.62ms - 336.04msunsure 🔍
-2% - +5%
-5.14ms - +15.35ms
unsure 🔍
-2% - +4%
-7.10ms - +13.45ms
-
lit-html-template-heavy

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
66.06ms - 68.08ms-unsure 🔍
-2% - +2%
-1.44ms - +1.19ms
unsure 🔍
-3% - +1%
-2.38ms - +0.73ms
tip-of-tree
tip-of-tree
66.35ms - 68.04msunsure 🔍
-2% - +2%
-1.19ms - +1.44ms
-unsure 🔍
-3% - +1%
-2.15ms - +0.75ms
previous-release
previous-release
66.72ms - 69.07msunsure 🔍
-1% - +4%
-0.73ms - +2.38ms
unsure 🔍
-1% - +3%
-0.75ms - +2.15ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
133.91ms - 137.30ms-unsure 🔍
-4% - +1%
-4.97ms - +0.93ms
unsure 🔍
-2% - +1%
-3.29ms - +1.97ms
tip-of-tree
tip-of-tree
135.20ms - 140.04msunsure 🔍
-1% - +4%
-0.93ms - +4.97ms
-unsure 🔍
-1% - +3%
-1.79ms - +4.50ms
previous-release
previous-release
134.26ms - 138.27msunsure 🔍
-1% - +2%
-1.97ms - +3.29ms
unsure 🔍
-3% - +1%
-4.50ms - +1.79ms
-
reactive-element-list

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
70.26ms - 72.36ms-unsure 🔍
-4% - +0%
-2.96ms - +0.23ms
unsure 🔍
-1% - +3%
-0.94ms - +1.91ms
tip-of-tree
tip-of-tree
71.47ms - 73.87msunsure 🔍
-0% - +4%
-0.23ms - +2.96ms
-slower ❌
0% - 5%
0.31ms - 3.39ms
previous-release
previous-release
69.85ms - 71.79msunsure 🔍
-3% - +1%
-1.91ms - +0.94ms
faster ✔
0% - 5%
0.31ms - 3.39ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
966.58ms - 982.48ms-unsure 🔍
-2% - +1%
-15.01ms - +9.83ms
unsure 🔍
-1% - +2%
-4.94ms - +15.69ms
tip-of-tree
tip-of-tree
967.57ms - 986.66msunsure 🔍
-1% - +2%
-9.83ms - +15.01ms
-unsure 🔍
-0% - +2%
-3.63ms - +19.55ms
previous-release
previous-release
962.58ms - 975.73msunsure 🔍
-2% - +1%
-15.69ms - +4.94ms
unsure 🔍
-2% - +0%
-19.55ms - +3.63ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
1018.47ms - 1034.58ms-unsure 🔍
-1% - +1%
-8.58ms - +13.64ms
unsure 🔍
-2% - +1%
-18.13ms - +9.46ms
tip-of-tree
tip-of-tree
1016.35ms - 1031.65msunsure 🔍
-1% - +1%
-13.64ms - +8.58ms
-unsure 🔍
-2% - +1%
-20.43ms - +6.70ms
previous-release
previous-release
1019.66ms - 1042.07msunsure 🔍
-1% - +2%
-9.46ms - +18.13ms
unsure 🔍
-1% - +2%
-6.70ms - +20.43ms
-

tachometer-reporter-action v2 for Benchmarks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[labs/ssr] LitElement renders content inside a Declarative Shadow DOM when using createRenderRoot server side

2 participants