Skip to content

[reactive-element] Make standard property decorator reflect initial values#4145

Merged
justinfagnani merged 6 commits into3.0from
3.0-hybrid-decorators-2
Aug 29, 2023
Merged

[reactive-element] Make standard property decorator reflect initial values#4145
justinfagnani merged 6 commits into3.0from
3.0-hybrid-decorators-2

Conversation

@justinfagnani
Copy link
Collaborator

@justinfagnani justinfagnani commented Aug 26, 2023

Part 2 of #4144

In order to get around the fact that the decorator result init() callback is called before the auto-accessor private field is installed, we add new parameters to requestUpdate() to forward the initial value.

@changeset-bot
Copy link

changeset-bot bot commented Aug 26, 2023

⚠️ No Changeset found

Latest commit: 1a38e16

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

@github-actions
Copy link
Contributor

github-actions bot commented Aug 26, 2023

📊 Tachometer Benchmark Results

Summary

nop-update

  • this-change, tip-of-tree, previous-release: unsure 🔍 -12% - +4% (-3.04ms - +1.15ms)
    this-change vs tip-of-tree

render

  • this-change: 87.76ms - 93.07ms
  • this-change, tip-of-tree, previous-release: unsure 🔍 -5% - +6% (-1.56ms - +1.96ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -2% - +4% (-1.23ms - +2.66ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -3% - +3% (-1.62ms - +1.45ms)
    this-change vs tip-of-tree

update

  • this-change: 928.09ms - 948.79ms
  • this-change, tip-of-tree, previous-release: unsure 🔍 -4% - +4% (-3.39ms - +3.79ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -3% - +3% (-3.56ms - +3.72ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -1% - +2% (-6.86ms - +16.66ms)
    this-change vs tip-of-tree

update-reflect

  • this-change: 878.76ms - 898.28ms
  • this-change, tip-of-tree, previous-release: unsure 🔍 -1% - +2% (-11.14ms - +15.03ms)
    this-change vs tip-of-tree

Results

this-change

render

VersionAvg timevs
87.76ms - 93.07ms-

update

VersionAvg timevs
928.09ms - 948.79ms-

update-reflect

VersionAvg timevs
878.76ms - 898.28ms-
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
32.55ms - 35.24ms-unsure 🔍
-5% - +6%
-1.56ms - +1.96ms
unsure 🔍
-8% - +3%
-2.80ms - +1.14ms
tip-of-tree
tip-of-tree
32.56ms - 34.83msunsure 🔍
-6% - +5%
-1.96ms - +1.56ms
-unsure 🔍
-8% - +2%
-2.86ms - +0.80ms
previous-release
previous-release
33.28ms - 36.17msunsure 🔍
-3% - +8%
-1.14ms - +2.80ms
unsure 🔍
-2% - +9%
-0.80ms - +2.86ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
86.93ms - 92.60ms-unsure 🔍
-4% - +4%
-3.39ms - +3.79ms
unsure 🔍
-8% - +1%
-7.33ms - +0.87ms
tip-of-tree
tip-of-tree
87.37ms - 91.77msunsure 🔍
-4% - +4%
-3.79ms - +3.39ms
-unsure 🔍
-8% - +0%
-7.12ms - +0.26ms
previous-release
previous-release
90.03ms - 95.96msunsure 🔍
-1% - +8%
-0.87ms - +7.33ms
unsure 🔍
-0% - +8%
-0.26ms - +7.12ms
-

nop-update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
22.23ms - 24.45ms-unsure 🔍
-12% - +4%
-3.04ms - +1.15ms
unsure 🔍
-6% - +9%
-1.37ms - +1.96ms
tip-of-tree
tip-of-tree
22.51ms - 26.06msunsure 🔍
-5% - +13%
-1.15ms - +3.04ms
-unsure 🔍
-4% - +15%
-0.92ms - +3.41ms
previous-release
previous-release
21.80ms - 24.28msunsure 🔍
-8% - +6%
-1.96ms - +1.37ms
unsure 🔍
-14% - +3%
-3.41ms - +0.92ms
-
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
58.99ms - 61.77ms-unsure 🔍
-2% - +4%
-1.23ms - +2.66ms
unsure 🔍
-1% - +5%
-0.48ms - +3.16ms
tip-of-tree
tip-of-tree
58.30ms - 61.03msunsure 🔍
-4% - +2%
-2.66ms - +1.23ms
-unsure 🔍
-2% - +4%
-1.18ms - +2.43ms
previous-release
previous-release
57.86ms - 60.22msunsure 🔍
-5% - +1%
-3.16ms - +0.48ms
unsure 🔍
-4% - +2%
-2.43ms - +1.18ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
126.51ms - 132.39ms-unsure 🔍
-3% - +3%
-3.56ms - +3.72ms
unsure 🔍
-0% - +5%
-0.34ms - +6.68ms
tip-of-tree
tip-of-tree
127.22ms - 131.52msunsure 🔍
-3% - +3%
-3.72ms - +3.56ms
-slower ❌
0% - 5%
0.21ms - 5.97ms
previous-release
previous-release
124.36ms - 128.20msunsure 🔍
-5% - +0%
-6.68ms - +0.34ms
faster ✔
0% - 5%
0.21ms - 5.97ms
-
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
51.19ms - 53.21ms-unsure 🔍
-3% - +3%
-1.62ms - +1.45ms
unsure 🔍
-1% - +4%
-0.36ms - +2.12ms
tip-of-tree
tip-of-tree
51.12ms - 53.44msunsure 🔍
-3% - +3%
-1.45ms - +1.62ms
-unsure 🔍
-1% - +5%
-0.41ms - +2.32ms
previous-release
previous-release
50.60ms - 52.05msunsure 🔍
-4% - +1%
-2.12ms - +0.36ms
unsure 🔍
-4% - +1%
-2.32ms - +0.41ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
916.39ms - 932.31ms-unsure 🔍
-1% - +2%
-6.86ms - +16.66ms
unsure 🔍
-0% - +2%
-4.25ms - +22.10ms
tip-of-tree
tip-of-tree
910.79ms - 928.11msunsure 🔍
-2% - +1%
-16.66ms - +6.86ms
-unsure 🔍
-1% - +2%
-9.59ms - +17.62ms
previous-release
previous-release
904.93ms - 925.93msunsure 🔍
-2% - +0%
-22.10ms - +4.25ms
unsure 🔍
-2% - +1%
-17.62ms - +9.59ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
904.70ms - 923.07ms-unsure 🔍
-1% - +2%
-11.14ms - +15.03ms
unsure 🔍
-1% - +2%
-9.98ms - +15.21ms
tip-of-tree
tip-of-tree
902.63ms - 921.26msunsure 🔍
-2% - +1%
-15.03ms - +11.14ms
-unsure 🔍
-1% - +1%
-12.03ms - +13.36ms
previous-release
previous-release
902.66ms - 919.90msunsure 🔍
-2% - +1%
-15.21ms - +9.98ms
unsure 🔍
-1% - +1%
-13.36ms - +12.03ms
-

tachometer-reporter-action v2 for Benchmarks

@github-actions
Copy link
Contributor

github-actions bot commented Aug 26, 2023

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

@justinfagnani justinfagnani changed the title Make standard property decorator reflect initial values [reactive-element] Make standard property decorator reflect initial values Aug 28, 2023
Copy link
Contributor

@AndrewJakubowicz AndrewJakubowicz left a comment

Choose a reason for hiding this comment

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

Nice!

Base automatically changed from 3.0-hybrid-decorators to 3.0 August 29, 2023 17:18
@justinfagnani justinfagnani merged commit 55332be into 3.0 Aug 29, 2023
@justinfagnani justinfagnani deleted the 3.0-hybrid-decorators-2 branch August 29, 2023 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants