- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Use papaya instead of dashmap #356
Conversation
CodSpeed Performance ReportMerging #356 will not alter performanceComparing Summary
|
Out of curiosity, are the benchmark results any better if you create the papaya::HashMap::builder()
.resize_mode(papaya::ResizeMode::Blocking)
.collector(seize::Collector::new().epoch_frequency(None))
.build() By default, |
@ibraheemdev Trying out the throughput-optimized configuration too. Just to clarify: Can the memory spikes be caused by stalled threads, even if they're not holding on to a pin? |
@arendjr No, the issue would be a thread holding on to a guard without dropping it. Epochs detect stalled threads and allow finer-grained reclamation of objects that they haven't accessed yet. This would be useful when holding a guard on an iterator, for example. |
No hurries on my end, so whenever @ibraheemdev feels ready for it! I'll can work on #358 independently. |
This should be good to go now with papaya 0.1.8. |
I've rebased on |
## 🤖 New release * `oxc_resolver`: 3.0.3 -> 4.0.0 (⚠️ API breaking changes) ###⚠️ `oxc_resolver` breaking changes ``` --- failure inherent_method_missing: pub method removed or renamed --- Description: A publicly-visible method or associated fn is no longer available under its prior name. It may have been renamed or removed entirely. ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.37.0/src/lints/inherent_method_missing.ron Failed in: ResolverGeneric::new_with_file_system, previously in file /tmp/.tmpKVx03E/oxc_resolver/src/lib.rs:138 --- failure struct_missing: pub struct removed or renamed --- Description: A publicly-visible struct cannot be imported by its prior path. A `pub use` may have been removed, or the struct itself may have been renamed or removed entirely. ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.37.0/src/lints/struct_missing.ron Failed in: struct oxc_resolver::PackageJson, previously in file /tmp/.tmpKVx03E/oxc_resolver/src/package_json.rs:14 ``` <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [4.0.0](oxc_resolver-v3.0.3...oxc_resolver-v4.0.0) - 2025-01-20 ### <!-- 0 -->Features - [**breaking**] generic fs cache `type Resolver = ResolverGeneric<FsCache<FileSystemOs>>` (#358) ### <!-- 2 -->Performance - use papaya instead of dashmap (#356) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/).
## 🤖 New release * `oxc_resolver`: 4.0.0 -> 4.0.1 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [4.0.0](oxc_resolver-v3.0.3...oxc_resolver-v4.0.0) - 2025-01-20 ### <!-- 0 -->Features - [**breaking**] generic fs cache `type Resolver = ResolverGeneric<FsCache<FileSystemOs>>` (#358) - [**breaking**] `PackageJson` and `TsConfig` traits (#360) ### <!-- 2 -->Performance - use papaya instead of dashmap (#356) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/).
This PR replaces uses of
dashmap
in theCache
withpapaya
: https://github.com/ibraheemdev/papaya/papaya
is designed for read-heavy workloads, which seems quite fitting for your caching use case. We've also switched to it in Biome and are getting good results.Note this PR currently depends on an unmerged feature I proposed, so I'm leaving it in Draft until this is merged: ibraheemdev/papaya#45
Performance results on my machine:
So a roughly 10~11% speedup on the first two benchmarks, and almost 7% on the one involving symlinks.