Skip to content

[labs/react] Filter __forwardedRef in prod build#3217

Closed
justinfagnani wants to merge 1 commit intomainfrom
react-forwarded-ref
Closed

[labs/react] Filter __forwardedRef in prod build#3217
justinfagnani wants to merge 1 commit intomainfrom
react-forwarded-ref

Conversation

@justinfagnani
Copy link
Copy Markdown
Collaborator

Fixes #3211

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Aug 15, 2022

⚠️ No Changeset found

Latest commit: f5072c7

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
Copy Markdown
Contributor

github-actions bot commented Aug 15, 2022

📊 Tachometer Benchmark Results

Summary

nop-update

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

render

  • lit-element-list: 71.80ms - 75.48ms
  • lit-html-kitchen-sink: unsure 🔍 -1% - +1% (-0.25ms - +0.17ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -2% - +2% (-0.26ms - +0.17ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -2% - +0% (-0.88ms - +0.19ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -2% - +1% (-1.14ms - +0.65ms)
    this-change vs tip-of-tree

update

  • lit-element-list: 671.31ms - 681.85ms
  • lit-html-kitchen-sink: unsure 🔍 -3% - +2% (-1.98ms - +1.30ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -0% - +2% (-0.24ms - +4.38ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -1% - +1% (-1.02ms - +1.55ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -1% - +2% (-8.82ms - +11.38ms)
    this-change vs tip-of-tree

update-reflect

  • lit-element-list: 685.44ms - 693.63ms
  • reactive-element-list: unsure 🔍 -1% - +3% (-9.10ms - +21.50ms)
    this-change vs tip-of-tree

Results

lit-element-list

render

VersionAvg timevs
71.80ms - 75.48ms-

update

VersionAvg timevs
671.31ms - 681.85ms-

update-reflect

VersionAvg timevs
685.44ms - 693.63ms-
lit-html-kitchen-sink

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
27.52ms - 27.81ms-unsure 🔍
-1% - +1%
-0.25ms - +0.17ms
unsure 🔍
-1% - +1%
-0.30ms - +0.16ms
tip-of-tree
tip-of-tree
27.55ms - 27.85msunsure 🔍
-1% - +1%
-0.17ms - +0.25ms
-unsure 🔍
-1% - +1%
-0.26ms - +0.20ms
previous-release
previous-release
27.56ms - 27.91msunsure 🔍
-1% - +1%
-0.16ms - +0.30ms
unsure 🔍
-1% - +1%
-0.20ms - +0.26ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
75.60ms - 78.21ms-unsure 🔍
-3% - +2%
-1.98ms - +1.30ms
unsure 🔍
-2% - +4%
-1.59ms - +2.73ms
tip-of-tree
tip-of-tree
76.25ms - 78.24msunsure 🔍
-2% - +3%
-1.30ms - +1.98ms
-unsure 🔍
-1% - +4%
-1.08ms - +2.90ms
previous-release
previous-release
74.61ms - 78.06msunsure 🔍
-4% - +2%
-2.73ms - +1.59ms
unsure 🔍
-4% - +1%
-2.90ms - +1.08ms
-

nop-update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
24.38ms - 24.76ms-unsure 🔍
-1% - +1%
-0.34ms - +0.20ms
unsure 🔍
-2% - +1%
-0.56ms - +0.15ms
tip-of-tree
tip-of-tree
24.45ms - 24.84msunsure 🔍
-1% - +1%
-0.20ms - +0.34ms
-unsure 🔍
-2% - +1%
-0.49ms - +0.23ms
previous-release
previous-release
24.47ms - 25.08msunsure 🔍
-1% - +2%
-0.15ms - +0.56ms
unsure 🔍
-1% - +2%
-0.23ms - +0.49ms
-
lit-html-repeat

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
10.33ms - 10.61ms-unsure 🔍
-2% - +2%
-0.26ms - +0.17ms
unsure 🔍
-2% - +2%
-0.23ms - +0.19ms
tip-of-tree
tip-of-tree
10.36ms - 10.68msunsure 🔍
-2% - +2%
-0.17ms - +0.26ms
-unsure 🔍
-2% - +2%
-0.19ms - +0.25ms
previous-release
previous-release
10.34ms - 10.64msunsure 🔍
-2% - +2%
-0.19ms - +0.23ms
unsure 🔍
-2% - +2%
-0.25ms - +0.19ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
270.04ms - 273.93ms-unsure 🔍
-0% - +2%
-0.24ms - +4.38ms
unsure 🔍
-2% - +1%
-4.59ms - +1.66ms
tip-of-tree
tip-of-tree
268.67ms - 271.16msunsure 🔍
-2% - +0%
-4.38ms - +0.24ms
-faster ✔
0% - 2%
0.79ms - 6.28ms
previous-release
previous-release
271.00ms - 275.89msunsure 🔍
-1% - +2%
-1.66ms - +4.59ms
slower ❌
0% - 2%
0.79ms - 6.28ms
-
lit-html-template-heavy

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
52.51ms - 53.28ms-unsure 🔍
-2% - +0%
-0.88ms - +0.19ms
unsure 🔍
-1% - +1%
-0.74ms - +0.37ms
tip-of-tree
tip-of-tree
52.87ms - 53.61msunsure 🔍
-0% - +2%
-0.19ms - +0.88ms
-unsure 🔍
-1% - +1%
-0.38ms - +0.70ms
previous-release
previous-release
52.68ms - 53.48msunsure 🔍
-1% - +1%
-0.37ms - +0.74ms
unsure 🔍
-1% - +1%
-0.70ms - +0.38ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
111.40ms - 113.14ms-unsure 🔍
-1% - +1%
-1.02ms - +1.55ms
unsure 🔍
-1% - +1%
-1.15ms - +1.36ms
tip-of-tree
tip-of-tree
111.06ms - 112.95msunsure 🔍
-1% - +1%
-1.55ms - +1.02ms
-unsure 🔍
-1% - +1%
-1.47ms - +1.15ms
previous-release
previous-release
111.26ms - 113.07msunsure 🔍
-1% - +1%
-1.36ms - +1.15ms
unsure 🔍
-1% - +1%
-1.15ms - +1.47ms
-
reactive-element-list

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
53.33ms - 54.43ms-unsure 🔍
-2% - +1%
-1.14ms - +0.65ms
unsure 🔍
-2% - +1%
-1.11ms - +0.79ms
tip-of-tree
tip-of-tree
53.42ms - 54.84msunsure 🔍
-1% - +2%
-0.65ms - +1.14ms
-unsure 🔍
-2% - +2%
-0.96ms - +1.14ms
previous-release
previous-release
53.27ms - 54.81msunsure 🔍
-1% - +2%
-0.79ms - +1.11ms
unsure 🔍
-2% - +2%
-1.14ms - +0.96ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
684.30ms - 697.90ms-unsure 🔍
-1% - +2%
-8.82ms - +11.38ms
unsure 🔍
-2% - +1%
-11.92ms - +7.90ms
tip-of-tree
tip-of-tree
682.35ms - 697.29msunsure 🔍
-2% - +1%
-11.38ms - +8.82ms
-unsure 🔍
-2% - +1%
-13.68ms - +7.10ms
previous-release
previous-release
685.90ms - 700.33msunsure 🔍
-1% - +2%
-7.90ms - +11.92ms
unsure 🔍
-1% - +2%
-7.10ms - +13.68ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
787.53ms - 808.56ms-unsure 🔍
-1% - +3%
-9.10ms - +21.50ms
unsure 🔍
-2% - +1%
-19.26ms - +9.24ms
tip-of-tree
tip-of-tree
780.72ms - 802.96msunsure 🔍
-3% - +1%
-21.50ms - +9.10ms
-unsure 🔍
-3% - +0%
-25.92ms - +3.49ms
previous-release
previous-release
793.43ms - 812.68msunsure 🔍
-1% - +2%
-9.24ms - +19.26ms
unsure 🔍
-0% - +3%
-3.49ms - +25.92ms
-

tachometer-reporter-action v2 for Benchmarks

@justinfagnani
Copy link
Copy Markdown
Collaborator Author

Note that there's no change to tests, but you can manually verify that there's no warning in prod test logs anymore.

@taylor-vann
Copy link
Copy Markdown
Contributor

taylor-vann commented Aug 15, 2022

I like the type changes too!

One question, does this pass __forwaredRef to the element? I believe the main reason we skip forwardedRef was to avoid #2593. It would add something like <custom-element $1> to an element.

  • EDIT
    misread the description, sounds like this is accounted for :) ?

Copy link
Copy Markdown
Contributor

@taylor-vann taylor-vann left a comment

Choose a reason for hiding this comment

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

As long as #2593 is accounted for in this change, I see no problems!

Copy link
Copy Markdown
Member

@sorvell sorvell left a comment

Choose a reason for hiding this comment

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

Looks good.

@taylor-vann
Copy link
Copy Markdown
Contributor

patched into #3409 and merged

@taylor-vann taylor-vann reopened this Nov 10, 2022
@taylor-vann
Copy link
Copy Markdown
Contributor

Closing. Resolved in #3409

@taylor-vann taylor-vann closed this Dec 5, 2022
@justinfagnani justinfagnani deleted the react-forwarded-ref branch August 14, 2023 17:22
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.

[labs/react] __forwardedRef is being minified in prod builds

3 participants