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] Use existing document in Node build #3223

Merged
merged 2 commits into from Aug 18, 2022
Merged

Conversation

augustjk
Copy link
Member

In Node builds, use the existing document if found.

This should allow node builds running in an environment with DOM emulation loaded to still function, like in a node test runner.

Fixes #3216

@changeset-bot
Copy link

changeset-bot bot commented Aug 18, 2022

🦋 Changeset detected

Latest commit: 57c9c8d

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

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!

@github-actions
Copy link
Contributor

github-actions bot commented Aug 18, 2022

📊 Tachometer Benchmark Results

Summary

nop-update

  • lit-html-kitchen-sink: unsure 🔍 -11% - +9% (-3.79ms - +3.28ms)
    this-change vs tip-of-tree

render

  • lit-element-list: 108.21ms - 110.38ms
  • lit-html-kitchen-sink: unsure 🔍 -3% - +4% (-1.45ms - +1.87ms)
    this-change vs tip-of-tree
  • lit-html-repeat: faster ✔ 1% - 14% (0.03ms - 2.04ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -2% - +2% (-1.53ms - +1.64ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -2% - +1% (-1.54ms - +1.26ms)
    this-change vs tip-of-tree

update

  • lit-element-list: 1119.18ms - 1131.78ms
  • lit-html-kitchen-sink: unsure 🔍 -5% - +7% (-5.70ms - +8.64ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -0% - +3% (-0.22ms - +12.12ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -2% - +3% (-3.56ms - +5.25ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -1% - +1% (-10.07ms - +7.98ms)
    this-change vs tip-of-tree

update-reflect

  • lit-element-list: 1131.71ms - 1142.35ms
  • reactive-element-list: unsure 🔍 -1% - +1% (-17.81ms - +7.04ms)
    this-change vs tip-of-tree

Results

lit-element-list

render

VersionAvg timevs
108.21ms - 110.38ms-

update

VersionAvg timevs
1119.18ms - 1131.78ms-

update-reflect

VersionAvg timevs
1131.71ms - 1142.35ms-
lit-html-kitchen-sink

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
45.52ms - 47.54ms-unsure 🔍
-3% - +4%
-1.45ms - +1.87ms
unsure 🔍
-10% - +4%
-4.94ms - +1.92ms
tip-of-tree
tip-of-tree
45.00ms - 47.64msunsure 🔍
-4% - +3%
-1.87ms - +1.45ms
-unsure 🔍
-11% - +4%
-5.25ms - +1.82ms
previous-release
previous-release
44.76ms - 51.32msunsure 🔍
-4% - +11%
-1.92ms - +4.94ms
unsure 🔍
-4% - +11%
-1.82ms - +5.25ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
118.90ms - 129.23ms-unsure 🔍
-5% - +7%
-5.70ms - +8.64ms
unsure 🔍
-6% - +8%
-7.79ms - +9.23ms
tip-of-tree
tip-of-tree
117.62ms - 127.57msunsure 🔍
-7% - +5%
-8.64ms - +5.70ms
-unsure 🔍
-7% - +6%
-9.15ms - +7.65ms
previous-release
previous-release
116.58ms - 130.12msunsure 🔍
-7% - +6%
-9.23ms - +7.79ms
unsure 🔍
-6% - +7%
-7.65ms - +9.15ms
-

nop-update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
32.73ms - 36.87ms-unsure 🔍
-11% - +9%
-3.79ms - +3.28ms
unsure 🔍
-7% - +10%
-2.25ms - +3.25ms
tip-of-tree
tip-of-tree
32.19ms - 37.92msunsure 🔍
-9% - +11%
-3.28ms - +3.79ms
-unsure 🔍
-8% - +12%
-2.63ms - +4.15ms
previous-release
previous-release
32.48ms - 36.10msunsure 🔍
-9% - +6%
-3.25ms - +2.25ms
unsure 🔍
-12% - +7%
-4.15ms - +2.63ms
-
lit-html-repeat

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
12.66ms - 13.19ms-faster ✔
1% - 14%
0.03ms - 2.04ms
unsure 🔍
-7% - +0%
-0.95ms - +0.04ms
tip-of-tree
tip-of-tree
12.99ms - 14.94msslower ❌
0% - 16%
0.03ms - 2.04ms
-unsure 🔍
-4% - +12%
-0.47ms - +1.64ms
previous-release
previous-release
12.97ms - 13.79msunsure 🔍
-0% - +7%
-0.04ms - +0.95ms
unsure 🔍
-11% - +3%
-1.64ms - +0.47ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
360.97ms - 369.52ms-unsure 🔍
-0% - +3%
-0.22ms - +12.12ms
unsure 🔍
-0% - +3%
+0.01ms - +11.85ms
tip-of-tree
tip-of-tree
354.85ms - 363.75msunsure 🔍
-3% - +0%
-12.12ms - +0.22ms
-unsure 🔍
-2% - +2%
-6.06ms - +6.03ms
previous-release
previous-release
355.22ms - 363.41msfaster ✔
0% - 3%
0.01ms - 11.85ms
unsure 🔍
-2% - +2%
-6.03ms - +6.06ms
-
lit-html-template-heavy

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
72.47ms - 74.71ms-unsure 🔍
-2% - +2%
-1.53ms - +1.64ms
unsure 🔍
-1% - +3%
-0.62ms - +2.10ms
tip-of-tree
tip-of-tree
72.42ms - 74.65msunsure 🔍
-2% - +2%
-1.64ms - +1.53ms
-unsure 🔍
-1% - +3%
-0.67ms - +2.04ms
previous-release
previous-release
72.08ms - 73.62msunsure 🔍
-3% - +1%
-2.10ms - +0.62ms
unsure 🔍
-3% - +1%
-2.04ms - +0.67ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
163.55ms - 170.94ms-unsure 🔍
-2% - +3%
-3.56ms - +5.25ms
unsure 🔍
-1% - +4%
-2.05ms - +6.03ms
tip-of-tree
tip-of-tree
163.99ms - 168.80msunsure 🔍
-3% - +2%
-5.25ms - +3.56ms
-unsure 🔍
-1% - +2%
-1.76ms - +4.06ms
previous-release
previous-release
163.61ms - 166.89msunsure 🔍
-4% - +1%
-6.03ms - +2.05ms
unsure 🔍
-2% - +1%
-4.06ms - +1.76ms
-
reactive-element-list

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
83.61ms - 85.42ms-unsure 🔍
-2% - +1%
-1.54ms - +1.26ms
unsure 🔍
-1% - +2%
-0.94ms - +1.49ms
tip-of-tree
tip-of-tree
83.59ms - 85.72msunsure 🔍
-1% - +2%
-1.26ms - +1.54ms
-unsure 🔍
-1% - +2%
-0.92ms - +1.75ms
previous-release
previous-release
83.43ms - 85.05msunsure 🔍
-2% - +1%
-1.49ms - +0.94ms
unsure 🔍
-2% - +1%
-1.75ms - +0.92ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
1160.38ms - 1173.96ms-unsure 🔍
-1% - +1%
-10.07ms - +7.98ms
unsure 🔍
-1% - +1%
-10.89ms - +6.59ms
tip-of-tree
tip-of-tree
1162.26ms - 1174.16msunsure 🔍
-1% - +1%
-7.98ms - +10.07ms
-unsure 🔍
-1% - +1%
-9.21ms - +7.00ms
previous-release
previous-release
1163.82ms - 1174.82msunsure 🔍
-1% - +1%
-6.59ms - +10.89ms
unsure 🔍
-1% - +1%
-7.00ms - +9.21ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
1206.72ms - 1217.35ms-unsure 🔍
-1% - +1%
-17.81ms - +7.04ms
unsure 🔍
-0% - +1%
-4.93ms - +11.95ms
tip-of-tree
tip-of-tree
1206.19ms - 1228.65msunsure 🔍
-1% - +1%
-7.04ms - +17.81ms
-unsure 🔍
-0% - +2%
-4.11ms - +21.91ms
previous-release
previous-release
1201.96ms - 1215.08msunsure 🔍
-1% - +0%
-11.95ms - +4.93ms
unsure 🔍
-2% - +0%
-21.91ms - +4.11ms
-

tachometer-reporter-action v2 for Benchmarks

@augustjk augustjk enabled auto-merge (squash) August 18, 2022 01:08
@augustjk augustjk merged commit 5a65ca9 into main Aug 18, 2022
@augustjk augustjk deleted the lit-html-node-document branch August 18, 2022 01:09
@lit-robot lit-robot mentioned this pull request Aug 18, 2022
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.

createComment is not a function error - lit and lit-html 2.3.0
2 participants