-
Notifications
You must be signed in to change notification settings - Fork 790
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
RawFSharpAssemblyDataBackedByLanguageService produces large amount of data both in Gen1 and LOH causing UI delays in VS #5933
Comments
|
Oh holy schmackos: This ends up allocating a 100KB array in memory twice: |
Yeah that would do it. |
Related, from that same trace:
|
After digging into this for a day and half, this is a bit complicated to fix. First, getting the Another approach would be to add a Before we fix |
In addition to looking at the shape/format of the allocated data, I think we need to dig into why My intuition is that one memoized instance of this should be forced each time Now If it is rechecking the current project that is causing this then we actually don't need to create If it is rechecking referenced projects then something is fishy. I feel it's likely that something is going wrong with memoizing these results in the incremental build graph: I suspect something is forcing referenced projects to be checked over and over again. Perhaps we have even fixed a bug in that area? I think the right approach is to get Trace logging which prints out the causal trace for the |
If you just need a stack, PerfView can do that for you. I'm of the same feeling, as I called out in #5938 it feels like we're doing a bunch of work over and over again and missing the cache. |
I assumed this was already happening, but we should get a trace to see. |
We should have the trace to see if that's the case |
This is mitigated already by @TIHan's work to use array pooling for the buffers. I did further mitigation in #12922, and will close this until we get remeasurement of an LOH problem for this. It might still happen when working a lot with large assemblies but the core common issue reported here should be gone I believe. |
Trace: https://developercommunity.visualstudio.com/content/problem/245320/coloring-typing-tooltips-and-intellisense-slow-in.html
Trace: https://developercommunity.visualstudio.com/content/problem/245786/slow-f-editing-experience-up-to-a-minute-until-typ.html
This class is producing huge amounts 4 GB of data in the above trace:
450 MB of this ends up on the large object heap:
The text was updated successfully, but these errors were encountered: