TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

How VSCode made bracket pair colorization faster (2021)

210 pointsby s3archalmost 2 years ago

24 comments

voz_almost 2 years ago
If you can make something 10k x faster you didn’t so much fix it as just switch it to working correctly as it should have in the first place.<p>VSCode is a good tool, but it’s unbearably slow, and it breaks my heart that so much development has converged on something written in electron with such a low regard for performance by any measure.
评论 #36434541 未加载
评论 #36434088 未加载
评论 #36434341 未加载
评论 #36434089 未加载
评论 #36434265 未加载
评论 #36434055 未加载
评论 #36434105 未加载
评论 #36435333 未加载
评论 #36434065 未加载
评论 #36434292 未加载
评论 #36434307 未加载
评论 #36434119 未加载
评论 #36434266 未加载
评论 #36436248 未加载
评论 #36434100 未加载
评论 #36434633 未加载
评论 #36434668 未加载
评论 #36436032 未加载
评论 #36434337 未加载
评论 #36434763 未加载
评论 #36434830 未加载
评论 #36434717 未加载
评论 #36434259 未加载
评论 #36435595 未加载
评论 #36434058 未加载
评论 #36434345 未加载
评论 #36440051 未加载
评论 #36434924 未加载
评论 #36434230 未加载
评论 #36435340 未加载
评论 #36434060 未加载
评论 #36434475 未加载
tomcatfishalmost 2 years ago
Everyone saying &quot;This isn&#x27;t a speedup, this is VSCode stopping being dumb&quot; hasn&#x27;t read carefully enough:<p>The speedup is from taking extension code built on a limited API and implementing it inside VSCode, using more information while doing so.
评论 #36435338 未加载
taericalmost 2 years ago
Odd to read that &quot;While we would have loved to just improve the performance of the extension (which certainly would have required introducing more advanced APIs, optimized for high-performance scenarios), the asynchronous communication between the renderer and the extension-host severely limits how fast bracket pair colorization can be when implemented as an extension. This limit cannot be overcome.&quot; Especially when I try out &quot;rainbow-delimiters&quot; in emacs and see that it is already quite fast.<p>I can kind of buy into the idea that &quot;async by default&quot; is a good path to build plugins. It boggles my mind that some of these slownesses are just lived with, though. How many other plugins that haven&#x27;t gotten the attention of the core team can never get sped up, because of this choice?
评论 #36434658 未加载
peoplefromibizaalmost 2 years ago
2021<p>already submitted two years ago (268 comments)<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=28692470">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=28692470</a>
评论 #36435056 未加载
Narishmaalmost 2 years ago
Do people really like this type of syntax highlighting? The screenshots in the article to me are a hard to read color soup.
评论 #36435433 未加载
评论 #36435969 未加载
评论 #36435415 未加载
评论 #36442195 未加载
评论 #36435583 未加载
sudoappsalmost 2 years ago
Speed and performance improvements like this are why VSCode has passed Atom and other editors over time.
JdeBPalmost 2 years ago
I suspect that one of these days someone will just bite the bullet and write an abstract syntax tree editor, and eliminate at a stroke all of the &quot;first, we turn the text into an abstract syntax tree&quot; steps that occur in everything from code colourization through folding to code suggestions. (-:
评论 #36435988 未加载
nielsbotalmost 2 years ago
One thing I miss the most from Xcode is the ability to double-click on any delimiter pair ([...], (...), &lt;...&gt;, {...}) to select all text between those delimiters.<p>I filed an issue against VSCode to get this implemented, but it never got enough upvotes..<p>Maybe posting about it here is my chance to get it done? :-P<p><a href="https:&#x2F;&#x2F;github.com&#x2F;microsoft&#x2F;vscode&#x2F;issues&#x2F;85587">https:&#x2F;&#x2F;github.com&#x2F;microsoft&#x2F;vscode&#x2F;issues&#x2F;85587</a>
评论 #36442057 未加载
practalalmost 2 years ago
When working on an experimental VSCode plugin recently, I noticed that bracket colorization was at odds with some basic functionality. For example, in comments, I didn&#x27;t want colorized brackets, I just wanted everything in the same color. That wasn&#x27;t possible, except for switching the native colorization off completely. Which I did.
jokoonalmost 2 years ago
I&#x27;m sorry but I still prefer sublime text, and it finally fixed syntax folding!<p>Sublime text also has a cheap way to do auto-completion, it will just look at existing words in the current file, it&#x27;s often just enough.
评论 #36434671 未加载
butzalmost 2 years ago
I recently noticed, that code window scrolling is a bit smoother and faster with terminal window closed. Could this be one of those &quot;10kx faster&quot; opportunities?
syngrog66almost 2 years ago
I specialize in software perf &amp; scalability, so read nearly everything I can on the subject, especially concrete cases like this!
nephanthalmost 2 years ago
That functionality looks pretty nice, anyone knows of an extension to do that in vim&#x2F;nvim ?
rafaelturkalmost 2 years ago
Such an awesome article to read.. how something `simple` can be extremely challenging to execute
tikualmost 2 years ago
I get scolded for to many ifs haha.
评论 #36434708 未加载
robertoandredalmost 2 years ago
Cool, maybe now they can add native titlebar functionality that real document apps have?
dtagamesalmost 2 years ago
And the project referenced is no longer available (or needed, apparently?)
评论 #36434034 未加载
Avlin67almost 2 years ago
this is old an did appear long time ago already on HD already...
RektBoyalmost 2 years ago
And now make something more production oriented like multi-screen window support, whoops you can&#x27;t and you buried this feature request in your github. GG.
frankreyesalmost 2 years ago
Monolith vs micro kernels, next round.
arijunalmost 2 years ago
[2021]
Solvencyalmost 2 years ago
And yet, somehow, no one has done anything to address the inherent issues for colorblind developers. All of these colorization add-ons are woefully inadequate in that regard.
评论 #36433991 未加载
评论 #36435991 未加载
评论 #36433973 未加载
omazurovalmost 2 years ago
No mature, sensible code allows for 10x performance improvement (let alone...). Every time I see a statement like this I take it as a confession.
评论 #36434402 未加载
评论 #36434361 未加载
评论 #36434382 未加载
评论 #36434371 未加载
评论 #36434970 未加载
akasakahakadaalmost 2 years ago
But these &quot;micro optimizations&quot; aren&#x27;t going to win anything!<p>Just keep everything slow and then everything will be alright.<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=36401488">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=36401488</a>
评论 #36434210 未加载