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

Skip to content

Conversation

@bmeurer
Copy link

@bmeurer bmeurer commented May 7, 2021

Following up on comments in https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2876969 here's a proof-of-concept to reduce the performance overhead of using static.ts

The major issue that seems to stand out still is the tests for _$litStatic$ which are going to pollute the engine's ICs. I'd suggest to maybe go with a WeakMap / WeakSet approach here instead.

cc @paullewis

@bmeurer bmeurer requested a review from justinfagnani as a code owner May 7, 2021 14:01
@google-cla google-cla bot added the cla: yes label May 7, 2021
@justinfagnani justinfagnani changed the title [wip] Reduce cache overhead of static templates. [lit-html] [wip] Reduce cache overhead of static templates. May 7, 2021
@bmeurer bmeurer requested a review from kevinpschaaf as a code owner January 10, 2024 02:20
@changeset-bot
Copy link

changeset-bot bot commented Jan 10, 2024

⚠️ No Changeset found

Latest commit: 121620b

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 Jan 10, 2024

πŸ“Š Tachometer Benchmark Results

Summary

nop-update

  • this-change, tip-of-tree, previous-release: unsure πŸ” -6% - +2% (-0.72ms - +0.25ms)
    this-change vs tip-of-tree

render

  • this-change: 47.45ms - 49.34ms
  • this-change, tip-of-tree, previous-release: unsure πŸ” -3% - +4% (-0.55ms - +0.69ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure πŸ” -3% - +2% (-0.86ms - +0.56ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure πŸ” -1% - +3% (-0.38ms - +0.88ms)
    this-change vs tip-of-tree

update

  • this-change: 499.18ms - 509.22ms
  • this-change, tip-of-tree, previous-release: unsure πŸ” -5% - +8% (-2.03ms - +3.03ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure πŸ” -3% - +2% (-1.89ms - +1.57ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure πŸ” -1% - +1% (-6.23ms - +6.97ms)
    this-change vs tip-of-tree

update-reflect

  • this-change: 502.52ms - 510.82ms
  • this-change, tip-of-tree, previous-release: unsure πŸ” -1% - +1% (-7.58ms - +5.29ms)
    this-change vs tip-of-tree

Results

this-change

render

VersionAvg timevs
47.45ms - 49.34ms-

update

VersionAvg timevs
499.18ms - 509.22ms-

update-reflect

VersionAvg timevs
502.52ms - 510.82ms-
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.20ms - 19.09ms-unsure πŸ”
-3% - +4%
-0.55ms - +0.69ms
unsure πŸ”
-4% - +3%
-0.82ms - +0.49ms
tip-of-tree
tip-of-tree
18.14ms - 19.01msunsure πŸ”
-4% - +3%
-0.69ms - +0.55ms
-unsure πŸ”
-5% - +2%
-0.88ms - +0.42ms
previous-release
previous-release
18.32ms - 19.29msunsure πŸ”
-3% - +4%
-0.49ms - +0.82ms
unsure πŸ”
-2% - +5%
-0.42ms - +0.88ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
38.51ms - 42.01ms-unsure πŸ”
-5% - +8%
-2.03ms - +3.03ms
unsure πŸ”
-1% - +11%
-0.41ms - +4.12ms
tip-of-tree
tip-of-tree
37.94ms - 41.58msunsure πŸ”
-7% - +5%
-3.03ms - +2.03ms
-unsure πŸ”
-3% - +10%
-0.96ms - +3.67ms
previous-release
previous-release
36.98ms - 39.84msunsure πŸ”
-10% - +1%
-4.12ms - +0.41ms
unsure πŸ”
-9% - +2%
-3.67ms - +0.96ms
-

nop-update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
10.86ms - 11.62ms-unsure πŸ”
-6% - +2%
-0.72ms - +0.25ms
unsure πŸ”
-3% - +6%
-0.31ms - +0.68ms
tip-of-tree
tip-of-tree
11.18ms - 11.78msunsure πŸ”
-2% - +6%
-0.25ms - +0.72ms
-unsure πŸ”
-0% - +8%
-0.01ms - +0.86ms
previous-release
previous-release
10.74ms - 11.37msunsure πŸ”
-6% - +3%
-0.68ms - +0.31ms
unsure πŸ”
-7% - +0%
-0.86ms - +0.01ms
-
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.86ms - 33.85ms-unsure πŸ”
-3% - +2%
-0.86ms - +0.56ms
unsure πŸ”
-2% - +2%
-0.79ms - +0.54ms
tip-of-tree
tip-of-tree
33.00ms - 34.01msunsure πŸ”
-2% - +3%
-0.56ms - +0.86ms
-unsure πŸ”
-2% - +2%
-0.65ms - +0.69ms
previous-release
previous-release
33.04ms - 33.92msunsure πŸ”
-2% - +2%
-0.54ms - +0.79ms
unsure πŸ”
-2% - +2%
-0.69ms - +0.65ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
69.00ms - 71.56ms-unsure πŸ”
-3% - +2%
-1.89ms - +1.57ms
unsure πŸ”
-4% - +1%
-2.83ms - +0.91ms
tip-of-tree
tip-of-tree
69.27ms - 71.60msunsure πŸ”
-2% - +3%
-1.57ms - +1.89ms
-unsure πŸ”
-4% - +1%
-2.60ms - +0.99ms
previous-release
previous-release
69.87ms - 72.61msunsure πŸ”
-1% - +4%
-0.91ms - +2.83ms
unsure πŸ”
-1% - +4%
-0.99ms - +2.60ms
-
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.86ms - 33.76ms-unsure πŸ”
-1% - +3%
-0.38ms - +0.88ms
unsure πŸ”
-1% - +3%
-0.17ms - +1.03ms
tip-of-tree
tip-of-tree
32.62ms - 33.50msunsure πŸ”
-3% - +1%
-0.88ms - +0.38ms
-unsure πŸ”
-1% - +2%
-0.41ms - +0.77ms
previous-release
previous-release
32.49ms - 33.27msunsure πŸ”
-3% - +0%
-1.03ms - +0.17ms
unsure πŸ”
-2% - +1%
-0.77ms - +0.41ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
505.84ms - 515.42ms-unsure πŸ”
-1% - +1%
-6.23ms - +6.97ms
unsure πŸ”
-1% - +2%
-3.68ms - +8.68ms
tip-of-tree
tip-of-tree
505.72ms - 514.81msunsure πŸ”
-1% - +1%
-6.97ms - +6.23ms
-unsure πŸ”
-1% - +2%
-3.86ms - +8.12ms
previous-release
previous-release
504.23ms - 512.04msunsure πŸ”
-2% - +1%
-8.68ms - +3.68ms
unsure πŸ”
-2% - +1%
-8.12ms - +3.86ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
508.47ms - 517.85ms-unsure πŸ”
-1% - +1%
-7.58ms - +5.29ms
unsure πŸ”
-2% - +1%
-8.75ms - +5.43ms
tip-of-tree
tip-of-tree
509.90ms - 518.72msunsure πŸ”
-1% - +1%
-5.29ms - +7.58ms
-unsure πŸ”
-1% - +1%
-7.43ms - +6.40ms
previous-release
previous-release
509.50ms - 520.15msunsure πŸ”
-1% - +2%
-5.43ms - +8.75ms
unsure πŸ”
-1% - +1%
-6.40ms - +7.43ms
-

tachometer-reporter-action v2 for Benchmarks

@github-actions
Copy link
Contributor

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

@augustjk
Copy link
Member

augustjk commented Jan 10, 2024

Merged in current main, resolving conflicts. Seems like this implementation is failing stability checks when using same tag name, e.g.

// Static values are stable between renders like static template strings
assert.strictEqual(div2, div);

We also need a static focused benchmark to gauge performance..

@justinfagnani justinfagnani marked this pull request as draft February 12, 2025 19:55
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.

2 participants