Skip to content

Only parsing styles on-demand #358

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

Merged
merged 3 commits into from
Jun 19, 2023
Merged

Only parsing styles on-demand #358

merged 3 commits into from
Jun 19, 2023

Conversation

marekdedic
Copy link
Contributor

Following up on #340, this function optimizes style parsing to only happen when requested.

Before:

$ time pnpm run test
pnpm run test  40,59s user 1,94s system 184% cpu 22,998 total

After:

$ pnpm run test
pnpm run test  39,06s user 1,93s system 183% cpu 22,395 total

The improvement is only modest on the test suite (but I imageine there aren't that many styles in the test suite), but seeing how simple of an optimization it is, seems worth it to me...

@changeset-bot
Copy link

changeset-bot bot commented Jun 19, 2023

🦋 Changeset detected

Latest commit: 325d573

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

This PR includes changesets to release 1 package
Name Type
svelte-eslint-parser Minor

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

@coveralls
Copy link

coveralls commented Jun 19, 2023

Pull Request Test Coverage Report for Build 5311760084

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 90.7%

Totals Coverage Status
Change from base Build 5311757196: -0.02%
Covered Lines: 2175
Relevant Lines: 2318

💛 - Coveralls

Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

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

Thank you! LGTM!

@ota-meshi ota-meshi merged commit 438be64 into sveltejs:main Jun 19, 2023
@marekdedic marekdedic deleted the on-demand-style-parsing branch June 19, 2023 12:21
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.

3 participants