Live data from Hacker News

VS Code uses 13% CPU when idle due to blinking cursor rendering

github.com

341–350 of 801 posts

Re: VS Code uses 13% CPU when idle due to blinking cursor rendering

#341
post #177

Earlier quoted context omitted.

Care to argue why? Also, there are countless alternative languages to compile down to HTML or CSS available. Feel free to create your own if none agree with your personal leanings.

CSS has many weird is corner cases where you have an issue and after a lot of debugging, trying things, getting mad you find on Stack Overflow that you add a ilogical rule like "min-width:0", so css is ok until you end up in a tricky problem where you need to understand how the css code works under the hood to fix. Other issue with css is too big and complicated, good layout modes are added but we stil ahve the old o…

> you add a ilogical rule like "min-width:0"

Yeah, like my favorite of these lately, widows and orphans. Chrome changed a default that affected inline-blocks within columns that caused them to wrap prematurely after version 52 or so. It is especially bad because the other popular browsers don't even support these yet and looked fine.

Re: VS Code uses 13% CPU when idle due to blinking cursor rendering

#342

> Because you can write plugins in JS? Yeah, kind of. Sadly most developers have neither formal nor self-taught education about compiled programming languages and/or desktop development. They're only familiar with web-related programming, so if you only have a hammer, everything looks like a nail. Being a hardcore real-time desktop developer during the mornings and a freelance web developer in the afternoons, I hones…

Can we cut the "holier than thou" pretentious bullshit?

Just because someone uses a different language, or solves different problems doesn't make them worse or any less "hardcore" than you.

You are right, the average JS developer might not be able to instantly know the details about how to implement a text buffer, because they don't need to do that on a daily basis. You probably don't know the details about how to implement a fast topological sort of a directed acyclic graph off the top of your head like this Javascript developer does.

That doesn't make you worse of a developer, it just means you are currently solving other problems that aren't related to that.

This stupid bullshit about how you aren't a "real developer" until you've done something needs to fucking stop. It's toxic.

Re: VS Code uses 13% CPU when idle due to blinking cursor rendering

#343
post #166

Earlier quoted context omitted.

> I think we'll get there eventually but until a native toolkit presents an interface as easy to use as the web developers are going to take the path of least resistance. Like Qt did with QML? http://doc.qt.io/qt-5/qml-tutorial1.html

Yeah, but Qt has licensing costs for commercial use...

Qt is LGPL, so unless you need to link to it statically or make proprietary modifications to Qt itself, you don't need to pay licensing costs.

Re: VS Code uses 13% CPU when idle due to blinking cursor rendering

#344
post #160
post #40

Earlier quoted context omitted.

Yep. I also can't wrap my head around the fact that we are now constructing buttons, drop-down boxes, tagged text boxes using dozens of nested layers instead of a native widget that writes directly to the screen. My 486 rendered UIs with nearly imperceptible lag. Google Docs takes a good 2-3 seconds to spin up a UI on my i7.

I don't get this criticism. HTML/CSS is the closest we have to a universally understood syntax for designing interfaces. Why invent a new standard? HTML is fine, CSS is fine. Most importantly, everyone understands it and can work immediately with it. Any issues with performance is due to the implementation of the platform that renders this HTML/CSS interface. It's much more likely Google Docs feels sluggish due to th…

Why invent a new standard? HTML is fine, CSS is fine. Most importantly, everyone understands it and can work immediately with it.

In order to render HTML, CSS and JavaScript, you need an entire web rendering engine. A new standard would let us get by with a lot less.

Re: VS Code uses 13% CPU when idle due to blinking cursor rendering

#345
post #297

It just doesn't go in my head that we are building text editors inside a web browser! I get it, there are many good use cases for Electron and it's easy to get started with cross platform support, but why is everybody going crazy about text editors in them? Because you can write plugins in JS? Wouldn't it be better to make native application, especially for code editors, where developers spend most of their time, whe…

It just doesn't go in my head how so many people have trouble understanding why things like VSCode or Atom are popular. They're sexy, they are powerful (extensions for everything), portable, and extremely easy to extend thanks to Javascript being pervasive. I don't know for certain but I'd also assume writing an Electron app is easier than writing a similar app in a lower level language. Is it really that hard to gra…

I've played around with VSCode and what it can do seems impressive, but I want to do one simple thing. I want to make the background black.

Every dark theme I can find makes the background dark gray, not black. I actually looked into what it would take to make a new color theme and I simply don't understand all the steps, and definitely don't want to deal with the hassle. It very quickly goes off into the weeds of TextMate themes (huh? Why are we referencing a Mac editor? Yeah, I know it's a de facto standard, but really?), editing XML (complete with hex codes for colors) and installing something called "Yo Code". Dude, I just want to change one friggin' color!

In every native app I've ever used, I can just go into the Options and make the background black, period.

Just because it's a programmer's editor shouldn't mean you need to be a programmer to make the simplest configuration.

Re: VS Code uses 13% CPU when idle due to blinking cursor rendering

#346
post #238

Earlier quoted context omitted.

> Doing the same with native technology would have took several weeks of coding, and it wouldn't have been cross-platform. Actually, it would take one hour because you would use Poppler, and it would be cross-platform. It would also be faster than pdf.js.

> Actually, it would take one hour because you would use Poppler, and it would be cross-platform. It would also be faster than pdf.js. I don't really know poppler. If there are Poppler bindings for the language you are developing in, I believe you that this is possible. This is only one use case though, I'm not sure you will find native libraries in your language for all features that VSCode can offer almost for free…

> I don't really know poppler.

Exactly. Web developers live in a bubble, and because they don't know much about native alternatives, they assume they don't exist.

Note: I'm a web developer and I don't know poppler.

Re: VS Code uses 13% CPU when idle due to blinking cursor rendering

#347

It just doesn't go in my head that we are building text editors inside a web browser! I get it, there are many good use cases for Electron and it's easy to get started with cross platform support, but why is everybody going crazy about text editors in them? Because you can write plugins in JS? Wouldn't it be better to make native application, especially for code editors, where developers spend most of their time, whe…

Building a plugin system is hard. Building one that allows creating complex UI elements, modifying other UI elements (from either the core app or other plugins) or changing the way literally anything is rendered is particularly hard. You not only have to build the code that supports all this, you also have to create and document an API and/or markup format to build all this out, plus document all your internal integr…

> Fire up VS Code, go to Help > Toggle Developer Tools, and poke around for a few minutes. Imagine the amount of time it would take to build a similar experience to just this one aspect if you were doing this from scratch.

Don't do it from scratch then. You can use GtkInspector to poke around with any GTK+ application, by pressing Ctrl+Shift+I.[1]

[1]: https://wiki.gnome.org/Projects/GTK%2B/Inspector

Re: VS Code uses 13% CPU when idle due to blinking cursor rendering

#348

Earlier quoted context omitted.

So you think hacking QT libraries like this (and not from the outside, I mean internally) and using C++ would make a good community editor? http://doc.qt.io/qt-5/qtwidgets-richtext-syntaxhighlighter-e... When using QT for a highly modular editor be prepared to code QT components from the lowest level. It's not like you take a QT widget and modify it on a simple way. Trust me. If you think it is easy to code editors l…

I've written low level GUI components for several UI frameworks before, thank you very much. It's not that bad and a lot smoother for the end user. The real problem is this new generation of "developers" that only know Javascript. When all you have is a hammer...

[deleted]

Re: VS Code uses 13% CPU when idle due to blinking cursor rendering

#350

It just doesn't go in my head that we are building text editors inside a web browser! I get it, there are many good use cases for Electron and it's easy to get started with cross platform support, but why is everybody going crazy about text editors in them? Because you can write plugins in JS? Wouldn't it be better to make native application, especially for code editors, where developers spend most of their time, whe…

The web is in just a shameful state. Even with 300 mbps fiber internet most websites are not snappy. As in, pages are so slow to render that I'll start reading, but then lose my place when the page reflows as it continues to load. Or click on the wrong thing because the page reflowed while I was trying to click on something. As far as I can tell I'm actually CPU-limited, because I noticed no real difference from when…

So you just assume that changing between 50 meg and 300 meg service actually should give you a 6x speed up during browsing? I think that's a very flawed assumption to make. Just because your connection is capable of a certain advertised speed doesn't mean you're getting that speed from any given server as you browse the Internet.
Post reply on HN