This was found by:
- Using VF# solution in VS 2019 Preview
- Working in
service.fs
- Noticing memory usage was high
- Profiling with good 'ole PerfView
- Typing a bit, invoking some features, etc.
GC Rollup

Using a 50 second sample of the full trace:
Allocations

System.Char[] allocations

CPU time

There are two problems at play here:
- We send all identifiers the compiler knows about through this algorithm when generating a set of suggested names when there is a compile error
- The routine itself allocates a lot of
char[]s and generally does a lot of work: https://github.com/Microsoft/visualfsharp/blob/master/src/utils/EditDistance.fs#L29
Taking a brief look, it doesn't seem trivial to make this faster or allocate less. It's also not clear how we could generate useful suggestions for people if we cannot scan all known identifiers.
That said, we should find something to do here. It comes as a result of typing in the IDE. Because this is done a lot (duh!), especially for slower typers, improving this would be useful.