-
Notifications
You must be signed in to change notification settings - Fork 1.7k
chore: Start infesting ide crates with 'db lifetime #19495
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
base: master
Are you sure you want to change the base?
Conversation
22e5376
to
da797a6
Compare
TraitEnvironment
into salsa
I would not merge this until we determine the effect on performance. |
analysis-stats for me varied by ~1% so very much within noise on my machine. |
Did we even intern |
da797a6
to
f0f1486
Compare
No, I got partially curious if we would gain something from it being interned. It doesn't look like it though. (Technically
There is no fine grained tracking here really given its an interned struct, not tracked one. |
Are you sure? I think interned structs also have fine grained tracking. Edit: It seems you're right, there's no fine grained tracking. |
How so? We'll need to intern |
f0f1486
to
78b5c6e
Compare
From what I understood, we will be interning the type-ir Ty's within salsa such that we get copy-able handles which is a hard requirement by the new solver. |
Didn't @jackh726 relax this requirement? |
Anyways this doesn't seem too useful, though I am inclined to include the |
To some degree, but not really. I still think we should do copy-able handles if possible. Does this have a memory usage impact, out of curiosity? |
78b5c6e
to
9fffec4
Compare
Looks like this doesnt save memory (2MB) but it is apparently faster? 10 seconds speedup for type inference on CI which I wouldn't classify as within noise https://github.com/rust-lang/rust-analyzer/actions/runs/14282272667/job/40033194279?pr=19495 vs https://github.com/rust-lang/rust-analyzer/actions/runs/14282156180/job/40032940941 |
Alright, nice! Maybe we should land this, since it could make Jack's life easier: https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/Implmentating.20New.20Trait.20Solver/near/510313582 |
Ah wait, forget that. We can't really take the numbers there seriously I think as those are debug builds (and they do seem to vary a lot). That is only memory usage there is sensible. |
9fffec4
to
03c8508
Compare
TraitEnvironment
into salsa
Got curious what this would look like, results in a bit of lifetime infestation :)