news.volyx.in

Making bracket pair colorization faster (code.visualstudio.com)

715 points by feross · 1819 days ago · 265 comments on HN

Article summary

The VS Code team has implemented a native bracket pair colorization feature, which is 10,000 times faster than the previous extension-based implementation. The new feature uses a recursive descent parser and reuses existing token information to achieve better performance. The extension developer was involved in the discussion and is in favor of the native implementation. The feature is now available in the core of VS Code and also works in VS Code for the Web.

Main themes

  • Bracket pair colorization
  • VS Code performance
  • Extension development
  • Native implementation
  • Collaboration
  • Performance optimization

What commenters say

  • Some commenters think that the native implementation is a great improvement and a natural step for a popular extension.
  • Others argue that the extension developer's work is being replaced by the native implementation, which could be seen as unfair.
  • A few commenters mention that the performance issue was not just about the extension, but also about the underlying architecture of VS Code.
  • Some argue that the native implementation sets a precedent for other extensions to be replaced, which could be a concern for extension developers.
  • There are also comments suggesting that the VS Code team should focus on exposing more internals to allow extensions to achieve better performance.
  • A few commenters praise the collaboration between the VS Code team and the extension developer, which led to a better outcome for users.