-
Notifications
You must be signed in to change notification settings - Fork 164
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
Experiment: Per ingredient sync table #650
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for salsa-rs canceled.
|
CodSpeed Performance ReportMerging #650 will not alter performanceComparing Summary
|
I rebased this change atop of a few others (#649 and Chayim's enum changes), and this change reduced rust-analyzer's However, I'm unsure of of the impact of this when it comes to parallelism, so I don't feel comfortable stamping this PR. |
@davidbarsky As an alternative I have my branch (unpublished), that shrinks |
I think putting up your changes for discussion would be good in general (as mine do change semantics wrt to parallelism) |
Lukas, I assume you're replying to Chayim, but here are the branches I have right now:
Notably, these are without Chayim's enum changes being used in rust-analyzer, which I'll port over now. |
Feel free to check, but putting up the branch (even in a draft state!) would be great. |
So I checked and on my machine, Lukas's changes save 255mb and my changes save 133mb. I'm working on finalizing and publishing my branch. |
For posterity/context for tomorrow's meeting, I believe Chayim's changes are on this branch: master...ChayimFriedman2:salsa:sync-v2. |
So, it would be nice for rust-analyzer to have this due to the memory decrease, I am not sure about the concurrency impact this has though. I would expect it to marginally be worse in that there is a coarser grained lock involved (within the ingredient), but that should only be an issue when there is high contention for the same ingredient so I believe this ought to be fine. (also adjusted the PR description) |
fd4a392
to
e2c4b38
Compare
I'll draft this for now, I think we can consider this once r-a is properly moved over and more parallelized to see if this has an effect or not |
Both memo table and sync tables increase the size of memos by quite a bit, so this replaces the per field locks with a per ingredient lock. I believe given that the lock is held fairly shortly we ought to be fine with this coarser grained locking (lock per ingredient to claim a sync). Alternatively we could make use of a
DashMap
as a tradeoff.