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

Monorepo playground #4732

Merged
merged 1 commit into from
Oct 17, 2024
Merged

Monorepo playground #4732

merged 1 commit into from
Oct 17, 2024

Conversation

graynorton
Copy link
Contributor

@graynorton graynorton commented Aug 13, 2024

Edit: Ready for approval

Per discussions in the review here and in the last Lit Eng meeting, I've removed the commits for the illustrative playground examples and am taking this PR out of Draft status—it's now ready for approval.


As discussed in a recent Lit Eng meeting, here's a draft PR exploring what it might look like to add a playground to the Lit monorepo.

See playground/README.md for rationale and details.

Making this a draft primarily because I included a couple of additional commits, adding specific playground examples for the purpose of illustration; for cleanliness, we'd probably want to remove those before landing this PR.

Copy link
Contributor

github-actions bot commented Aug 13, 2024

📊 Tachometer Benchmark Results

Summary

nop-update

  • this-change, tip-of-tree, previous-release: faster ✔ 1% - 7% (0.15ms - 0.92ms)
    this-change vs tip-of-tree

render

  • this-change: 49.42ms - 62.42ms
  • this-change, tip-of-tree, previous-release: unsure 🔍 -4% - +2% (-0.87ms - +0.45ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -0% - +2% (-0.12ms - +0.76ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -14% - +45% (-6.72ms - +24.55ms)
    this-change vs tip-of-tree

update

  • this-change: 516.28ms - 520.95ms
  • this-change, tip-of-tree, previous-release: unsure 🔍 -10% - +1% (-4.17ms - +0.39ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -1% - +2% (-1.10ms - +1.81ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -2% - +3% (-8.05ms - +15.37ms)
    this-change vs tip-of-tree

update-reflect

  • this-change: 516.98ms - 524.13ms
  • this-change, tip-of-tree, previous-release: unsure 🔍 -0% - +1% (-2.46ms - +5.61ms)
    this-change vs tip-of-tree

Results

this-change

render

VersionAvg timevs
49.42ms - 62.42ms-

update

VersionAvg timevs
516.28ms - 520.95ms-

update-reflect

VersionAvg timevs
516.98ms - 524.13ms-
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
19.12ms - 19.92ms-unsure 🔍
-4% - +2%
-0.87ms - +0.45ms
unsure 🔍
-4% - +2%
-0.86ms - +0.30ms
tip-of-tree
tip-of-tree
19.20ms - 20.26msunsure 🔍
-2% - +4%
-0.45ms - +0.87ms
-unsure 🔍
-4% - +3%
-0.75ms - +0.61ms
previous-release
previous-release
19.37ms - 20.23msunsure 🔍
-2% - +4%
-0.30ms - +0.86ms
unsure 🔍
-3% - +4%
-0.61ms - +0.75ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
38.80ms - 41.97ms-unsure 🔍
-10% - +1%
-4.17ms - +0.39ms
unsure 🔍
-8% - +3%
-3.41ms - +1.14ms
tip-of-tree
tip-of-tree
40.63ms - 43.91msunsure 🔍
-1% - +10%
-0.39ms - +4.17ms
-unsure 🔍
-4% - +7%
-1.56ms - +3.07ms
previous-release
previous-release
39.89ms - 43.15msunsure 🔍
-3% - +9%
-1.14ms - +3.41ms
unsure 🔍
-7% - +4%
-3.07ms - +1.56ms
-

nop-update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
11.96ms - 12.51ms-faster ✔
1% - 7%
0.15ms - 0.92ms
unsure 🔍
-4% - +2%
-0.53ms - +0.30ms
tip-of-tree
tip-of-tree
12.50ms - 13.04msslower ❌
1% - 8%
0.15ms - 0.92ms
-unsure 🔍
-0% - +7%
+0.01ms - +0.83ms
previous-release
previous-release
12.04ms - 12.66msunsure 🔍
-2% - +4%
-0.30ms - +0.53ms
faster ✔
0% - 6%
0.01ms - 0.83ms
-
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
36.53ms - 37.16ms-unsure 🔍
-0% - +2%
-0.12ms - +0.76ms
unsure 🔍
-3% - +1%
-0.98ms - +0.30ms
tip-of-tree
tip-of-tree
36.22ms - 36.84msunsure 🔍
-2% - +0%
-0.76ms - +0.12ms
-faster ✔
0% - 3%
0.02ms - 1.30ms
previous-release
previous-release
36.63ms - 37.75msunsure 🔍
-1% - +3%
-0.30ms - +0.98ms
slower ❌
0% - 4%
0.02ms - 1.30ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
81.03ms - 83.27ms-unsure 🔍
-1% - +2%
-1.10ms - +1.81ms
unsure 🔍
-2% - +2%
-1.39ms - +1.62ms
tip-of-tree
tip-of-tree
80.86ms - 82.73msunsure 🔍
-2% - +1%
-1.81ms - +1.10ms
-unsure 🔍
-2% - +1%
-1.61ms - +1.13ms
previous-release
previous-release
81.04ms - 83.04msunsure 🔍
-2% - +2%
-1.62ms - +1.39ms
unsure 🔍
-1% - +2%
-1.13ms - +1.61ms
-
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
54.18ms - 77.35ms-unsure 🔍
-14% - +45%
-6.72ms - +24.55ms
unsure 🔍
-32% - +10%
-24.71ms - +8.39ms
tip-of-tree
tip-of-tree
46.35ms - 67.35msunsure 🔍
-36% - +9%
-24.55ms - +6.72ms
-faster ✔
4% - 42%
1.26ms - 32.88ms
previous-release
previous-release
62.11ms - 85.74msunsure 🔍
-14% - +39%
-8.39ms - +24.71ms
unsure 🔍
-2% - +62%
+1.26ms - +32.88ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
522.64ms - 544.97ms-unsure 🔍
-2% - +3%
-8.05ms - +15.37ms
unsure 🔍
-1% - +3%
-7.28ms - +17.04ms
tip-of-tree
tip-of-tree
526.62ms - 533.66msunsure 🔍
-3% - +1%
-15.37ms - +8.05ms
-unsure 🔍
-1% - +1%
-4.74ms - +7.19ms
previous-release
previous-release
524.10ms - 533.74msunsure 🔍
-3% - +1%
-17.04ms - +7.28ms
unsure 🔍
-1% - +1%
-7.19ms - +4.74ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
555.46ms - 562.69ms-unsure 🔍
-0% - +1%
-2.46ms - +5.61ms
unsure 🔍
-1% - +1%
-5.57ms - +2.88ms
tip-of-tree
tip-of-tree
555.70ms - 559.29msunsure 🔍
-1% - +0%
-5.61ms - +2.46ms
-faster ✔
0% - 1%
0.09ms - 5.75ms
previous-release
previous-release
558.23ms - 562.60msunsure 🔍
-1% - +1%
-2.88ms - +5.57ms
slower ❌
0% - 1%
0.09ms - 5.75ms
-

tachometer-reporter-action v2 for Benchmarks

Copy link
Contributor

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

Copy link

changeset-bot bot commented Aug 13, 2024

🦋 Changeset detected

Latest commit: f03fbcc

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

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@@ -0,0 +1,11 @@
{
"source": "https://lit.dev/playground/#gist=aece301df423847e72b1a85e1e9caf75",
Copy link
Member

Choose a reason for hiding this comment

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

Is this intended to be committed? If so, it seems weird to name it by issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. In working on Virtualizer issues, I've found that committing a minimal repro, followed by the fix, makes for a very convenient PR review process. A reviewer can check out the PR branch, temporarily detach HEAD to view the repro without the fix, then switch back to the tip of the branch to review the fix.

I've also found through experience that when a repro case is part of a workflow like this, it's easiest to use the issue number as the name of the repro, to minimize cognitive load.

@@ -0,0 +1 @@
{}
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to include defaults here that make the example installable standalone?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Lit libraries are intentionally left out of the package.json so that examples will automatically default to using the versions from the current branch of the monorepo.

I wasn't thinking of standalone examples as a P0/P1 use case, but if we want to support that, I think the best way of doing it would be to add an export:standalone script that adds deps into the exported package.json.

playground/README.md Show resolved Hide resolved
playground/README.md Show resolved Hide resolved
.gitignore Outdated
@@ -7,4 +7,4 @@ node_modules/
/temp
.idea
/scripts/check-size-out.md

/playground/p/**/package-lock.json
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a folder here for playgrounds to be auto-ignored and call it out in the readme?

e.g. /playground/scratch/**

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, that's a good idea!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added!

@graynorton graynorton force-pushed the monorepo-playground branch 3 times, most recently from eef6aa5 to f3c470f Compare August 24, 2024 17:22
@graynorton graynorton changed the title DRAFT: Monorepo playground Monorepo playground Sep 19, 2024
@graynorton graynorton marked this pull request as ready for review September 19, 2024 23:38
@graynorton graynorton merged commit d75f8d1 into main Oct 17, 2024
9 checks passed
@graynorton graynorton deleted the monorepo-playground branch October 17, 2024 19:13
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.

2 participants