-
Notifications
You must be signed in to change notification settings - Fork 181
Move salsa event system into Zalsa
#849
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
Conversation
✅ Deploy Preview for salsa-rs canceled.
|
CodSpeed Performance ReportMerging #849 will improve performances by 6.05%Comparing Summary
Benchmarks breakdown
|
7ffa829
to
da5a6db
Compare
This shrinks the return value from 16 to 8 bytes
da5a6db
to
14ae8c6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't do a line by line review but this looks great.
Huh, I'm pretty sure I wrote one more comment but it seems it didn't make it. Roughly, it would be nice if |
Ye that should be doable, though do note the |
## Summary * Update salsa to pull in salsa-rs/salsa#850. * Some refactoring of salsa event callbacks in various `Db`'s due to salsa-rs/salsa#849 closes astral-sh/ty#108 ## Test Plan Ran `cargo run --bin ty -- -vvv` on a test file to make sure that salsa Events are still logged.
The existence of
Database::salsa_event
is incredibly annoying as a lot of internal code takes a&dyn Database
solely to do event reporting where as usually a&Zalsa
handle would otherwise suffice. This becomes even more annoying when mutable handles are involved as it requires some odd code structuring to avoid mutability xor shared errors, it also makes optimizations more difficult for the compiler due to dynamic dispatches it can't look through.So this moves the trait method away to a separate callback that can be registered, and if not registered, can be skipped entirely.