Skip to content

CreateVisuals calling ITextSnapshot.GetText causes severe performance problems in large documents #31

@sharwell

Description

@sharwell

🔗 Originally reported as https://developercommunity.visualstudio.com/t/visual-studio-very-slow-after-last-updat/10232726

The following code should not call GetText(). This method produces both a char[] and string representation of the document behind the scenes, leading to significant GC pressure and user-visible pauses in the UI.

https://github.com/chingucoding/IndentRainbow/blob/f360b230b8bf49c74007a3047cc3dec555b7e1ec/src/IndentRainbow.Extension/Classification/Indent.cs#L112-L131

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions