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

perf: Using better string cache #6893

Conversation

IWANABETHATGUY
Copy link
Contributor

@IWANABETHATGUY IWANABETHATGUY commented Feb 1, 2023

Description:
Using better string-cache
The latest Mutex implementation is faster than parking_lot, especially when locking contention is heavy,
rust-lang/rust#95035 (comment),
This could have a huge performance improvement when using swc in some parallel scenarios, like bundler.

BREAKING CHANGE:

Related issue (if exists):

@IWANABETHATGUY IWANABETHATGUY changed the title chore: 🤖 init perf: Using better string cache Feb 1, 2023
@IWANABETHATGUY IWANABETHATGUY marked this pull request as draft February 1, 2023 06:31
@IWANABETHATGUY IWANABETHATGUY marked this pull request as ready for review February 1, 2023 06:45
@@ -28,7 +28,7 @@ rkyv = { package = "rkyv", version = "=0.7.37", optional = true }
rkyv-latest = { package = "rkyv-test", version = "=0.7.38-test.2", optional = true }
rustc-hash = "1.1.0"
serde = "1"
string_cache = "0.8.4"
string_cache = { git = "https://github.com/swc-project/string-cache", branch = "swc" }
Copy link
Member

Choose a reason for hiding this comment

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

This prevents publishing crates

Copy link
Contributor

@hyf0 hyf0 Feb 2, 2023

Choose a reason for hiding this comment

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

Could we reuse the repo and publish a string-cache of SWC version? Something like string-cache-swc.

For some reason, I guess they(string-cache) just don't want to change anything. servo/string-cache#265

Copy link
Member

Choose a reason for hiding this comment

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

Yes, but I think you can use patch section of cargo to use it, and changing string_cache with something different is a breaking change.

@kdy1 kdy1 marked this pull request as draft February 28, 2023 03:38
@IWANABETHATGUY IWANABETHATGUY deleted the chore/better-string-cache branch March 8, 2023 02:18
@swc-project swc-project locked as resolved and limited conversation to collaborators Apr 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants