You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks; I found the same binary size effect and removed all the parking_lot locks from the reactive crate long ago, but must've not realized I had these ones in tachys/the renderer.
The house style is to use .or_poisoned() (the OrPoisoned trait) to unwrap locks so it is clearer at a glance that it's distinct from other .unwrap() calls
Not sure what the lock contention is like for a typical leptos app to gauge the better choice here or what proportion of locking is happening in wasm vs the server (when using SSR) where thread contention actually matters
There should be effectively zero lock contention for the cases covered by this PR. In the tachys case there will be zero contention, and either kind of lock will actually panic in the frontend if there are conflicts. In the other cases, it's mostly reading from/writing to ResponseOptions, which a typical request would do in 0 or 1 places. Contention would consist of something like "I am trying to write into ResponseOptions from within m different Suspense components which have been spawned onto n different tokio worker threads, simultaneously" and so the worst real case I can imagine for these would be well within the "low to moderate contention" scenario where std outperforms parking_lot in the linked article's benchmarks.
gbj
added a commit
that referenced
this pull request
Jan 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on #4408, it needs to be merged first.
Shouldn't have any effects on size and performance from the usage.
Reduced wasm bundle size by 5% on my production project.