How VSCode made bracket pair colorization faster (2021)

When dealing with deeply nested brackets in Visual Studio Code, it can be difficult to figure out which brackets match and which do not. The Bracket Pair Colorizer extension provides a solution by colorizing matching brackets in creative ways. However, due to performance issues caused by the Decoration API and missing access to VS Code’s token information, the extension can be slow on large files. To address this, the VS Code team has reimplemented the extension in the core of VS Code, using an abstract syntax tree and (2,3)-trees to improve the performance of querying brackets. This update is supported in both VS Code for desktop and VS Code for the Web.

https://code.visualstudio.com/blogs/2021/09/29/bracket-pair-colorization

To top