Description
I took a sample of editing some code across several in FSharp.Editor.dll and noticed that there's a lot of string allocations happening in ItemsAreEffectivelyEqual
. In only 37 seconds it allocated 84 MB. Most of these are small and short-lived, but it still feels excessive.
Two routines are involved, both allocating a lot:
Looking at the code, this happens when checking Item.ModuleOrNamespaces
here:
fsharp/src/fsharp/NameResolution.fs
Lines 1813 to 1816 in 2571fe7
And it appears to be a "only do this if everything else failed" check.
Is it necessary? This is a lot of string allocations, and when combined makes up the bulk registered by profiling when editing code. Note that the source of these allocations is unused opens analysis.
Metadata
Metadata
Assignees
Type
Projects
Status