TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

How VSCode made bracket pair colorization faster (2021)

210 点作者 s3arch将近 2 年前

24 条评论

voz_将近 2 年前
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 未加载
tomcatfish将近 2 年前
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 未加载
taeric将近 2 年前
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 未加载
peoplefromibiza将近 2 年前
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 未加载
Narishma将近 2 年前
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 未加载
sudoapps将近 2 年前
Speed and performance improvements like this are why VSCode has passed Atom and other editors over time.
JdeBP将近 2 年前
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 未加载
nielsbot将近 2 年前
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 未加载
practal将近 2 年前
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.
jokoon将近 2 年前
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 未加载
butz将近 2 年前
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?
syngrog66将近 2 年前
I specialize in software perf &amp; scalability, so read nearly everything I can on the subject, especially concrete cases like this!
nephanth将近 2 年前
That functionality looks pretty nice, anyone knows of an extension to do that in vim&#x2F;nvim ?
rafaelturk将近 2 年前
Such an awesome article to read.. how something `simple` can be extremely challenging to execute
tiku将近 2 年前
I get scolded for to many ifs haha.
评论 #36434708 未加载
robertoandred将近 2 年前
Cool, maybe now they can add native titlebar functionality that real document apps have?
dtagames将近 2 年前
And the project referenced is no longer available (or needed, apparently?)
评论 #36434034 未加载
Avlin67将近 2 年前
this is old an did appear long time ago already on HD already...
RektBoy将近 2 年前
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.
frankreyes将近 2 年前
Monolith vs micro kernels, next round.
arijun将近 2 年前
[2021]
Solvency将近 2 年前
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 未加载
omazurov将近 2 年前
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 未加载
akasakahakada将近 2 年前
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 未加载