isOpenStatementUsed uses a lot of CPU and memory
I collected a trace after about an hour of working in VisualFSharp.sln when memory was pretty high. I found that the isOpenStatementUsed function is pretty expensive relative to other things.
10.8% of all allocations in the sample (533MB):

And 6.3% of total CPU time:

This is because the routine does a very expensive list operation where it scans a document's symbols to check if a given open statement is responsible for those symbols (i.e., if the open statement can be removed or not).
This isn't really a big deal with small files, but for large ones (like in the compiler codebase), it bubbles up to the top like this.
Unfortunately, there doesn't seem to be an easy win here. Making this better will likely mean rewriting how we determine if an open declaration is in use.