Skip to content

Work around TS compiler bug in context#3691

Merged
rictic merged 2 commits intomainfrom
context-prototype
Feb 22, 2023
Merged

Work around TS compiler bug in context#3691
rictic merged 2 commits intomainfrom
context-prototype

Conversation

@rictic
Copy link
Copy Markdown
Collaborator

@rictic rictic commented Feb 22, 2023

No description provided.

@rictic rictic requested a review from benjamind as a code owner February 22, 2023 19:19
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 22, 2023

📊 Tachometer Benchmark Results

Summary

nop-update

  • lit-html-kitchen-sink: unsure 🔍 -1% - +5% (-0.16ms - +0.85ms)
    this-change vs tip-of-tree

render

  • lit-element-list: 82.58ms - 86.51ms
  • lit-html-kitchen-sink: unsure 🔍 -4% - +7% (-1.17ms - +2.21ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -9% - +1% (-1.02ms - +0.10ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -3% - +2% (-1.55ms - +0.95ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -2% - +3% (-1.37ms - +1.82ms)
    this-change vs tip-of-tree

update

  • lit-element-list: 803.92ms - 815.82ms
  • lit-html-kitchen-sink: unsure 🔍 -5% - +3% (-3.99ms - +2.52ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -3% - +1% (-10.86ms - +2.48ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -1% - +2% (-1.63ms - +2.22ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -1% - +1% (-4.11ms - +7.54ms)
    this-change vs tip-of-tree

update-reflect

  • lit-element-list: 798.13ms - 807.75ms
  • reactive-element-list: unsure 🔍 -1% - +1% (-4.40ms - +7.50ms)
    this-change vs tip-of-tree

Results

lit-element-list

render

VersionAvg timevs
82.58ms - 86.51ms-

update

VersionAvg timevs
803.92ms - 815.82ms-

update-reflect

VersionAvg timevs
798.13ms - 807.75ms-
lit-html-kitchen-sink

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
32.42ms - 34.83ms-unsure 🔍
-4% - +7%
-1.17ms - +2.21ms
unsure 🔍
-6% - +4%
-2.08ms - +1.46ms
tip-of-tree
tip-of-tree
31.91ms - 34.30msunsure 🔍
-7% - +3%
-2.21ms - +1.17ms
-unsure 🔍
-8% - +3%
-2.59ms - +0.93ms
previous-release
previous-release
32.63ms - 35.23msunsure 🔍
-4% - +6%
-1.46ms - +2.08ms
unsure 🔍
-3% - +8%
-0.93ms - +2.59ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
80.52ms - 84.66ms-unsure 🔍
-5% - +3%
-3.99ms - +2.52ms
unsure 🔍
-1% - +8%
-0.34ms - +6.11ms
tip-of-tree
tip-of-tree
80.81ms - 85.83msunsure 🔍
-3% - +5%
-2.52ms - +3.99ms
-slower ❌
0% - 9%
0.09ms - 7.15ms
previous-release
previous-release
77.23ms - 82.17msunsure 🔍
-7% - +0%
-6.11ms - +0.34ms
faster ✔
0% - 8%
0.09ms - 7.15ms
-

nop-update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
16.58ms - 17.47ms-unsure 🔍
-1% - +5%
-0.16ms - +0.85ms
unsure 🔍
-2% - +4%
-0.36ms - +0.74ms
tip-of-tree
tip-of-tree
16.44ms - 16.92msunsure 🔍
-5% - +1%
-0.85ms - +0.16ms
-unsure 🔍
-3% - +1%
-0.56ms - +0.25ms
previous-release
previous-release
16.51ms - 17.16msunsure 🔍
-4% - +2%
-0.74ms - +0.36ms
unsure 🔍
-1% - +3%
-0.25ms - +0.56ms
-
lit-html-repeat

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
10.97ms - 11.81ms-unsure 🔍
-9% - +1%
-1.02ms - +0.10ms
unsure 🔍
-5% - +5%
-0.58ms - +0.61ms
tip-of-tree
tip-of-tree
11.48ms - 12.22msunsure 🔍
-1% - +9%
-0.10ms - +1.02ms
-unsure 🔍
-1% - +9%
-0.09ms - +1.04ms
previous-release
previous-release
10.95ms - 11.80msunsure 🔍
-5% - +5%
-0.61ms - +0.58ms
unsure 🔍
-9% - +1%
-1.04ms - +0.09ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
304.29ms - 312.00ms-unsure 🔍
-3% - +1%
-10.86ms - +2.48ms
unsure 🔍
-3% - +1%
-9.75ms - +4.33ms
tip-of-tree
tip-of-tree
306.89ms - 317.78msunsure 🔍
-1% - +4%
-2.48ms - +10.86ms
-unsure 🔍
-2% - +3%
-6.54ms - +9.50ms
previous-release
previous-release
304.96ms - 316.75msunsure 🔍
-1% - +3%
-4.33ms - +9.75ms
unsure 🔍
-3% - +2%
-9.50ms - +6.54ms
-
lit-html-template-heavy

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
53.71ms - 55.43ms-unsure 🔍
-3% - +2%
-1.55ms - +0.95ms
unsure 🔍
-3% - +2%
-1.73ms - +0.98ms
tip-of-tree
tip-of-tree
53.96ms - 55.77msunsure 🔍
-2% - +3%
-0.95ms - +1.55ms
-unsure 🔍
-3% - +2%
-1.46ms - +1.31ms
previous-release
previous-release
53.90ms - 55.99msunsure 🔍
-2% - +3%
-0.98ms - +1.73ms
unsure 🔍
-2% - +3%
-1.31ms - +1.46ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
116.63ms - 119.05ms-unsure 🔍
-1% - +2%
-1.63ms - +2.22ms
unsure 🔍
-1% - +2%
-0.75ms - +2.45ms
tip-of-tree
tip-of-tree
116.05ms - 119.05msunsure 🔍
-2% - +1%
-2.22ms - +1.63ms
-unsure 🔍
-1% - +2%
-1.27ms - +2.38ms
previous-release
previous-release
115.95ms - 118.03msunsure 🔍
-2% - +1%
-2.45ms - +0.75ms
unsure 🔍
-2% - +1%
-2.38ms - +1.27ms
-
reactive-element-list

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
54.37ms - 56.52ms-unsure 🔍
-2% - +3%
-1.37ms - +1.82ms
unsure 🔍
-2% - +4%
-1.25ms - +2.29ms
tip-of-tree
tip-of-tree
54.04ms - 56.40msunsure 🔍
-3% - +2%
-1.82ms - +1.37ms
-unsure 🔍
-3% - +4%
-1.54ms - +2.13ms
previous-release
previous-release
53.52ms - 56.33msunsure 🔍
-4% - +2%
-2.29ms - +1.25ms
unsure 🔍
-4% - +3%
-2.13ms - +1.54ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
816.51ms - 822.88ms-unsure 🔍
-1% - +1%
-4.11ms - +7.54ms
unsure 🔍
-0% - +1%
-2.71ms - +8.78ms
tip-of-tree
tip-of-tree
813.10ms - 822.86msunsure 🔍
-1% - +1%
-7.54ms - +4.11ms
-unsure 🔍
-1% - +1%
-5.51ms - +8.15ms
previous-release
previous-release
811.88ms - 821.44msunsure 🔍
-1% - +0%
-8.78ms - +2.71ms
unsure 🔍
-1% - +1%
-8.15ms - +5.51ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
827.80ms - 836.74ms-unsure 🔍
-1% - +1%
-4.40ms - +7.50ms
unsure 🔍
-1% - +1%
-5.55ms - +7.62ms
tip-of-tree
tip-of-tree
826.79ms - 834.65msunsure 🔍
-1% - +1%
-7.50ms - +4.40ms
-unsure 🔍
-1% - +1%
-6.75ms - +5.72ms
previous-release
previous-release
826.39ms - 836.07msunsure 🔍
-1% - +1%
-7.62ms - +5.55ms
unsure 🔍
-1% - +1%
-5.72ms - +6.75ms
-

tachometer-reporter-action v2 for Benchmarks

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 22, 2023

🦋 Changeset detected

Latest commit: 5d70d0a

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

This PR includes changesets to release 1 package
Name Type
@lit-labs/context 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

super('context-provider', {bubbles: true, composed: true});
// Work around TypeScript compiler bug
// https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work
Object.setPrototypeOf(this, new.target.prototype);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

at least using new.target.prototype means subclasses of this class don't have to do the same trick (if someone wanted to subclass for some odd reason)

@rictic rictic merged commit 4fa0311 into main Feb 22, 2023
@rictic rictic deleted the context-prototype branch February 22, 2023 19:36
@lit-robot lit-robot mentioned this pull request Mar 10, 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.

2 participants