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

Skip to content

Conversation

@augustjk
Copy link
Member

@augustjk augustjk commented Mar 7, 2024

Fixes #4569

We now correctly early return when an event prop binding contains the same value across re-renders, instead of moving on to setting it on the underlying element instance.

@changeset-bot
Copy link

changeset-bot bot commented Mar 7, 2024

🦋 Changeset detected

Latest commit: eee2730

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

This PR includes changesets to release 2 packages
Name Type
@lit/react Patch
@lit-internal/test-elements-react 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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2024

📊 Tachometer Benchmark Results

Summary

nop-update

  • this-change, tip-of-tree, previous-release: unsure 🔍 -2% - +7% (-0.26ms - +0.76ms)
    this-change vs tip-of-tree

render

  • this-change: 47.37ms - 49.50ms
  • this-change, tip-of-tree, previous-release: unsure 🔍 -2% - +6% (-0.30ms - +1.19ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -1% - +3% (-0.50ms - +1.08ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: faster ✔ 0% - 3% (0.14ms - 1.15ms)
    this-change vs tip-of-tree

update

  • this-change: 527.59ms - 540.73ms
  • this-change, tip-of-tree, previous-release: unsure 🔍 -1% - +13% (-0.21ms - +5.38ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -2% - +1% (-1.46ms - +0.96ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -1% - +1% (-4.99ms - +7.48ms)
    this-change vs tip-of-tree

update-reflect

  • this-change: 533.86ms - 549.76ms
  • this-change, tip-of-tree, previous-release: unsure 🔍 -1% - +1% (-4.44ms - +5.66ms)
    this-change vs tip-of-tree

Results

this-change

render

VersionAvg timevs
47.37ms - 49.50ms-

update

VersionAvg timevs
527.59ms - 540.73ms-

update-reflect

VersionAvg timevs
533.86ms - 549.76ms-
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
18.65ms - 19.59ms-unsure 🔍
-2% - +6%
-0.30ms - +1.19ms
unsure 🔍
-5% - +2%
-0.90ms - +0.45ms
tip-of-tree
tip-of-tree
18.10ms - 19.25msunsure 🔍
-6% - +2%
-1.19ms - +0.30ms
-unsure 🔍
-7% - +0%
-1.42ms - +0.08ms
previous-release
previous-release
18.86ms - 19.83msunsure 🔍
-2% - +5%
-0.45ms - +0.90ms
unsure 🔍
-1% - +8%
-0.08ms - +1.42ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
41.58ms - 46.04ms-unsure 🔍
-1% - +13%
-0.21ms - +5.38ms
unsure 🔍
-4% - +10%
-1.68ms - +4.33ms
tip-of-tree
tip-of-tree
39.53ms - 42.91msunsure 🔍
-12% - +0%
-5.38ms - +0.21ms
-unsure 🔍
-9% - +3%
-3.89ms - +1.37ms
previous-release
previous-release
40.47ms - 44.50msunsure 🔍
-10% - +4%
-4.33ms - +1.68ms
unsure 🔍
-3% - +10%
-1.37ms - +3.89ms
-

nop-update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
11.09ms - 11.85ms-unsure 🔍
-2% - +7%
-0.26ms - +0.76ms
unsure 🔍
-4% - +6%
-0.49ms - +0.65ms
tip-of-tree
tip-of-tree
10.88ms - 11.56msunsure 🔍
-7% - +2%
-0.76ms - +0.26ms
-unsure 🔍
-6% - +3%
-0.71ms - +0.37ms
previous-release
previous-release
10.97ms - 11.81msunsure 🔍
-6% - +4%
-0.65ms - +0.49ms
unsure 🔍
-3% - +6%
-0.37ms - +0.71ms
-
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.16ms - 35.39ms-unsure 🔍
-1% - +3%
-0.50ms - +1.08ms
unsure 🔍
-2% - +2%
-0.71ms - +0.86ms
tip-of-tree
tip-of-tree
33.99ms - 34.98msunsure 🔍
-3% - +1%
-1.08ms - +0.50ms
-unsure 🔍
-3% - +1%
-0.91ms - +0.47ms
previous-release
previous-release
34.22ms - 35.19msunsure 🔍
-2% - +2%
-0.86ms - +0.71ms
unsure 🔍
-1% - +3%
-0.47ms - +0.91ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
78.01ms - 79.75ms-unsure 🔍
-2% - +1%
-1.46ms - +0.96ms
unsure 🔍
-2% - +1%
-1.97ms - +0.77ms
tip-of-tree
tip-of-tree
78.28ms - 79.97msunsure 🔍
-1% - +2%
-0.96ms - +1.46ms
-unsure 🔍
-2% - +1%
-1.70ms - +1.00ms
previous-release
previous-release
78.42ms - 80.53msunsure 🔍
-1% - +2%
-0.77ms - +1.97ms
unsure 🔍
-1% - +2%
-1.00ms - +1.70ms
-
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
31.88ms - 32.49ms-faster ✔
0% - 3%
0.14ms - 1.15ms
unsure 🔍
-2% - +1%
-0.59ms - +0.32ms
tip-of-tree
tip-of-tree
32.42ms - 33.23msslower ❌
0% - 4%
0.14ms - 1.15ms
-unsure 🔍
-0% - +3%
-0.02ms - +1.03ms
previous-release
previous-release
31.98ms - 32.66msunsure 🔍
-1% - +2%
-0.32ms - +0.59ms
unsure 🔍
-3% - +0%
-1.03ms - +0.02ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
551.22ms - 560.56ms-unsure 🔍
-1% - +1%
-4.99ms - +7.48ms
unsure 🔍
-1% - +1%
-5.85ms - +7.13ms
tip-of-tree
tip-of-tree
550.51ms - 558.79msunsure 🔍
-1% - +1%
-7.48ms - +4.99ms
-unsure 🔍
-1% - +1%
-6.72ms - +5.51ms
previous-release
previous-release
550.75ms - 559.76msunsure 🔍
-1% - +1%
-7.13ms - +5.85ms
unsure 🔍
-1% - +1%
-5.51ms - +6.72ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
556.67ms - 564.29ms-unsure 🔍
-1% - +1%
-4.44ms - +5.66ms
unsure 🔍
-0% - +1%
-2.27ms - +7.46ms
tip-of-tree
tip-of-tree
556.56ms - 563.19msunsure 🔍
-1% - +1%
-5.66ms - +4.44ms
-unsure 🔍
-0% - +1%
-2.51ms - +6.47ms
previous-release
previous-release
554.86ms - 560.92msunsure 🔍
-1% - +0%
-7.46ms - +2.27ms
unsure 🔍
-1% - +0%
-6.47ms - +2.51ms
-

tachometer-reporter-action v2 for Benchmarks

@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2024

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

Copy link
Collaborator

@justinfagnani justinfagnani left a comment

Choose a reason for hiding this comment

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

nice! 🎉

@augustjk
Copy link
Member Author

augustjk commented Mar 7, 2024

Benchmarks workflow failure should be fixed by #4573

Copy link

@stefanpearson stefanpearson left a comment

Choose a reason for hiding this comment

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

Amazing! I didn't expect a fix so quickly, you outpaced my workaround PR. I'm also glad I'm, in fact, not insane. 🙌

@augustjk augustjk merged commit 5ed30d4 into main Mar 8, 2024
@augustjk augustjk deleted the react-event-binds branch March 8, 2024 18:15
@stefanpearson
Copy link

Hey @augustjk 👋 , what is the release schedule for pushing out a new version?

@lit-robot lit-robot mentioned this pull request Mar 11, 2024
@augustjk
Copy link
Member Author

@stefanpearson Sorry for the delay. It has just now been published!

@stefanpearson
Copy link

@stefanpearson Sorry for the delay. It has just now been published!

Thanks!

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.

@lit/react binds event callback prop as instance property, overriding the element's class method

3 participants