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

Remove css-tag stylesheet caching by css text #2978

Merged
merged 4 commits into from Jun 17, 2022
Merged

Conversation

justinfagnani
Copy link
Collaborator

We didn't intend to share StyleSheets between components, but we were by having a cache keyed by style text. This removes that cache and stores the StyleSheet with the CSSResult.

@justinfagnani justinfagnani marked this pull request as ready for review June 1, 2022 15:18
@github-actions
Copy link
Contributor

github-actions bot commented Jun 1, 2022

📊 Tachometer Benchmark Results

Summary

nop-update

  • lit-html-kitchen-sink: faster ✔ 1% - 4% (0.17ms - 1.18ms)
    this-change vs tip-of-tree

render

  • lit-element-list: unsure 🔍 -2% - +2% (-2.51ms - +2.15ms)
    this-change vs tip-of-tree
  • lit-html-kitchen-sink: unsure 🔍 -2% - +1% (-0.91ms - +0.37ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -2% - +5% (-0.21ms - +0.64ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -2% - +2% (-1.17ms - +1.58ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -8% - +11% (-6.24ms - +8.90ms)
    this-change vs tip-of-tree

update

  • lit-element-list: unsure 🔍 -5% - +3% (-52.66ms - +36.46ms)
    this-change vs tip-of-tree
  • lit-html-kitchen-sink: unsure 🔍 -2% - +2% (-2.32ms - +2.43ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -3% - +1% (-15.21ms - +6.11ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -2% - +3% (-2.68ms - +4.27ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -12% - +6% (-198.33ms - +107.73ms)
    this-change vs tip-of-tree

update-reflect

  • lit-element-list: unsure 🔍 -2% - +2% (-20.81ms - +24.79ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -3% - +1% (-37.63ms - +8.27ms)
    this-change vs tip-of-tree

Results

lit-element-list

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
100.31ms - 103.31ms-unsure 🔍
-2% - +2%
-2.51ms - +2.15ms
faster ✔
19% - 22%
23.99ms - 27.76ms
tip-of-tree
tip-of-tree
100.21ms - 103.78msunsure 🔍
-2% - +2%
-2.15ms - +2.51ms
-faster ✔
19% - 22%
23.57ms - 27.81ms
previous-release
previous-release
126.54ms - 128.84msslower ❌
23% - 28%
23.99ms - 27.76ms
slower ❌
23% - 28%
23.57ms - 27.81ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
1037.42ms - 1088.04ms-unsure 🔍
-5% - +3%
-52.66ms - +36.46ms
faster ✔
32% - 36%
508.64ms - 576.11ms
tip-of-tree
tip-of-tree
1034.15ms - 1107.51msunsure 🔍
-3% - +5%
-36.46ms - +52.66ms
-faster ✔
31% - 36%
491.34ms - 577.21ms
previous-release
previous-release
1582.80ms - 1627.41msslower ❌
47% - 55%
508.64ms - 576.11ms
slower ❌
44% - 55%
491.34ms - 577.21ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
1057.42ms - 1089.59ms-unsure 🔍
-2% - +2%
-20.81ms - +24.79ms
faster ✔
7% - 11%
82.75ms - 128.16ms
tip-of-tree
tip-of-tree
1055.36ms - 1087.67msunsure 🔍
-2% - +2%
-24.79ms - +20.81ms
-faster ✔
7% - 11%
84.69ms - 130.20ms
previous-release
previous-release
1162.94ms - 1194.98msslower ❌
8% - 12%
82.75ms - 128.16ms
slower ❌
8% - 12%
84.69ms - 130.20ms
-
lit-html-kitchen-sink

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
41.86ms - 42.68ms-unsure 🔍
-2% - +1%
-0.91ms - +0.37ms
faster ✔
10% - 14%
4.66ms - 6.70ms
tip-of-tree
tip-of-tree
42.05ms - 43.03msunsure 🔍
-1% - +2%
-0.37ms - +0.91ms
-faster ✔
9% - 13%
4.35ms - 6.46ms
previous-release
previous-release
47.01ms - 48.88msslower ❌
11% - 16%
4.66ms - 6.70ms
slower ❌
10% - 15%
4.35ms - 6.46ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
105.23ms - 108.43ms-unsure 🔍
-2% - +2%
-2.32ms - +2.43ms
unsure 🔍
-3% - +3%
-2.87ms - +3.20ms
tip-of-tree
tip-of-tree
105.02ms - 108.54msunsure 🔍
-2% - +2%
-2.43ms - +2.32ms
-unsure 🔍
-3% - +3%
-3.01ms - +3.23ms
previous-release
previous-release
104.09ms - 109.24msunsure 🔍
-3% - +3%
-3.20ms - +2.87ms
unsure 🔍
-3% - +3%
-3.23ms - +3.01ms
-

nop-update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
32.34ms - 33.13ms-faster ✔
1% - 4%
0.17ms - 1.18ms
faster ✔
10% - 13%
3.72ms - 5.05ms
tip-of-tree
tip-of-tree
33.10ms - 33.72msslower ❌
1% - 4%
0.17ms - 1.18ms
-faster ✔
8% - 12%
3.09ms - 4.33ms
previous-release
previous-release
36.59ms - 37.66msslower ❌
11% - 16%
3.72ms - 5.05ms
slower ❌
9% - 13%
3.09ms - 4.33ms
-
lit-html-repeat

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
12.83ms - 13.48ms-unsure 🔍
-2% - +5%
-0.21ms - +0.64ms
faster ✔
7% - 12%
0.99ms - 1.80ms
tip-of-tree
tip-of-tree
12.66ms - 13.22msunsure 🔍
-5% - +2%
-0.64ms - +0.21ms
-faster ✔
9% - 13%
1.24ms - 1.98ms
previous-release
previous-release
14.31ms - 14.79msslower ❌
7% - 14%
0.99ms - 1.80ms
slower ❌
9% - 15%
1.24ms - 1.98ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
445.53ms - 464.52ms-unsure 🔍
-3% - +1%
-15.21ms - +6.11ms
faster ✔
23% - 26%
137.04ms - 159.64ms
tip-of-tree
tip-of-tree
454.73ms - 464.42msunsure 🔍
-1% - +3%
-6.11ms - +15.21ms
-faster ✔
23% - 25%
135.97ms - 151.61ms
previous-release
previous-release
597.23ms - 609.50msslower ❌
30% - 36%
137.04ms - 159.64ms
slower ❌
29% - 33%
135.97ms - 151.61ms
-
lit-html-template-heavy

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
66.68ms - 68.94ms-unsure 🔍
-2% - +2%
-1.17ms - +1.58ms
faster ✔
14% - 17%
10.82ms - 13.64ms
tip-of-tree
tip-of-tree
66.82ms - 68.38msunsure 🔍
-2% - +2%
-1.58ms - +1.17ms
-faster ✔
14% - 17%
11.28ms - 13.59ms
previous-release
previous-release
79.19ms - 80.89msslower ❌
16% - 20%
10.82ms - 13.64ms
slower ❌
17% - 20%
11.28ms - 13.59ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
151.18ms - 156.32ms-unsure 🔍
-2% - +3%
-2.68ms - +4.27ms
faster ✔
11% - 14%
18.45ms - 24.67ms
tip-of-tree
tip-of-tree
150.62ms - 155.29msunsure 🔍
-3% - +2%
-4.27ms - +2.68ms
-faster ✔
11% - 14%
19.44ms - 25.27ms
previous-release
previous-release
173.56ms - 177.06msslower ❌
12% - 16%
18.45ms - 24.67ms
slower ❌
13% - 17%
19.44ms - 25.27ms
-
reactive-element-list

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
75.83ms - 86.93ms-unsure 🔍
-8% - +11%
-6.24ms - +8.90ms
unsure 🔍
-6% - +13%
-4.63ms - +10.05ms
tip-of-tree
tip-of-tree
74.91ms - 85.19msunsure 🔍
-11% - +8%
-8.90ms - +6.24ms
-unsure 🔍
-7% - +11%
-5.66ms - +8.42ms
previous-release
previous-release
73.87ms - 83.48msunsure 🔍
-12% - +6%
-10.05ms - +4.63ms
unsure 🔍
-10% - +7%
-8.42ms - +5.66ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
1482.94ms - 1696.38ms-unsure 🔍
-12% - +6%
-198.33ms - +107.73ms
unsure 🔍
-13% - +5%
-219.42ms - +78.19ms
tip-of-tree
tip-of-tree
1525.28ms - 1744.64msunsure 🔍
-7% - +13%
-107.73ms - +198.33ms
-unsure 🔍
-11% - +8%
-176.25ms - +125.62ms
previous-release
previous-release
1556.58ms - 1763.97msunsure 🔍
-5% - +14%
-78.19ms - +219.42ms
unsure 🔍
-8% - +11%
-125.62ms - +176.25ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
1090.03ms - 1121.28ms-unsure 🔍
-3% - +1%
-37.63ms - +8.27ms
unsure 🔍
-3% - +1%
-36.77ms - +13.93ms
tip-of-tree
tip-of-tree
1103.53ms - 1137.15msunsure 🔍
-1% - +3%
-8.27ms - +37.63ms
-unsure 🔍
-2% - +3%
-22.84ms - +29.36ms
previous-release
previous-release
1097.12ms - 1137.04msunsure 🔍
-1% - +3%
-13.93ms - +36.77ms
unsure 🔍
-3% - +2%
-29.36ms - +22.84ms
-

tachometer-reporter-action v2 for Benchmarks

@changeset-bot
Copy link

changeset-bot bot commented Jun 17, 2022

🦋 Changeset detected

Latest commit: da13ee2

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

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

@justinfagnani justinfagnani merged commit 634d456 into main Jun 17, 2022
@justinfagnani justinfagnani deleted the remove-css-tag-cache branch June 17, 2022 23:28
@lit-robot lit-robot mentioned this pull request Jun 21, 2022
@lit-robot lit-robot mentioned this pull request Jun 29, 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.

None yet

4 participants