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

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/swc_atoms/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.

triomphe = "0.1.8"

[build-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/swc_common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ rustc-hash = "1.1.0"
serde = { version = "1.0.119", features = ["derive"] }
siphasher = "0.3.9"
sourcemap = { version = "6", optional = true }
string_cache = "0.8.4"
string_cache = { git = "https://github.com/swc-project/string-cache", branch = "swc" }
swc_atoms = { version = "0.4.32", path = "../swc_atoms" }
swc_eq_ignore_macros = { version = "0.1.1", path = "../swc_eq_ignore_macros" }
swc_visit = { version = "0.5.4", path = "../swc_visit" }
Expand Down