-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Search fewer projects when looking for linked documents #73939
base: main
Are you sure you want to change the base?
Conversation
@jasonmalinowski @ToddGrun this is ready for review. |
This would work for direct multi-targeting but would mean we're no longer doing file sharing for things like shared projects or linked files. So this may have a performance impact in those cases if the file counts were high enough. I am missing some historical context here, but this kinda feels like we're undoing the benefits of #72792 -- if the code is simpler now but we're having to add magic hashing and fancy locking and heuristics...was the old code just better? Or can we get the best of both worlds somehow? |
It was much more complex to try to have a single dictionary. It's nto really magic hashing. It's just what the runtime does on .net core for strings. We're on netfx, so i'm just copying their impl since it's faster :) It is a heuristic. But i don't see a concern there. Having things perform great for the common case is the ideal for me :)
Sure. It's a tradeoff. With the old system tehre was a lot of complexity (and bugginess) keepign the full map correct. In hte new system, there are smaller maps that are trivial to keep up to date. But we need to bit smarter as we have 1k projects to search through. This feels like a good middle ground. |
Ok. Talking to @jasonmalinowski @ToddGrun, this is a prime case for an control tower flag. We can make the change, and then have an option to disable this if we run into any issues in the wild. @jasonmalinowski does that work for you? |
603e356
to
ef9768a
Compare
@jasonmalinowski @ToddGrun ptal. Note: i have a feature flag here so we can control this through control tower if we need to. |
Followup to #73937.
Drops CPU cost while loading a project like Roslyn from:
to
The idea here is that instead of searching every other project to find linked documents to share document contents with, we instead only search the particular other "flavors" of a particular project. For example, when trying to share content for a file in
Workspaces (netstandard2.0)
we now only search inWorkspaces (net7.0)
andWorkspaces (net8.0)
instead of all projects.--
Build: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=9815633&view=results