Live data from Hacker News

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

github.com

721–730 of 801 posts

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

#721
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…

  > everyone understands it and can work immediately with it.
Only if by "understands" you mean "everyone is capable to throw things at the wall and seeing what sticks". I have seen a lot o HTML and CSS and let's just say, only a small fraction looked like it was done by someone with understanding "what" and "why". Otherwise it was just tortured to the point "somehow works unless someone changes something".

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

#722
post #555
post #534

Earlier quoted context omitted.

Best bit is that X11 runs really well these days -- responsive, fast, reliable. Emacs runs great, gitk, xterm, xosview, mplayer window manager, even Firefox is alright. Renoise, Maya, Blender too. Not to mention network transparency when I need it. It's a great environment to get my work done, and 3x hi res displays is the stuff I dreamt of 15 years ago. So it's a good job we're about to throw it all out and start ag…

> X11 runs really well these days -- responsive, fast, reliable Well, you haven't seen Windows then - the graphics stack is phenomenal and a marvel of engineering. nVidia drivers crash? I only get a second of black screen and then resume my work. Yep, that's right - no other GUI program crashed, I didn't had to do anything, literally just 1 second of black screen. Oh and you can have one window on two monitors and bo…

Yes, but only if you have the Aero compositor turned on... which adds at least one frame of latency to everything. Without Aero, Chrome can't play video without tearing like crazy. Oh, and that white pixel in the top left corner of the screen if you've got Aero turned on but turned off the annoying as crap transparent windows. Yeah, scary good...

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

#723

An internet points out that Hackernews' favorite text editor takes up more CPU than the average Hackernews would have had at their disposal 20 years ago just to make the cursor blink on and off. Hackernews circles the wagons to justify the stupid engineering design decisions behind said editor based solely on the fact that embedding a complete Web browser just to draw buttons and text fields "won" over any sensible G…

I'm glad at least we made fun of both sides. I really wish there was a good option for GUI toolkits. Nearly all are either too primitive to make more than freshmen college (or tenured physics professor) level work or asymptotically approach web browsers without all that tedious attention to improvement and accessibility.

wxWidgets has improved a lot, give it a try.

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

#724
This comment section deserve to be posted in some kind of drama-oriented section, a little like /r/subredditdrama

Personally I'm waiting for the second net bubble to burst, so that we can force everyone to use a stricter markup language.

Everyone is seeing how android apps are slowly but literally making HTML completely obsolete, and honestly that's an awesome thing, because it's really needed.

I hope the tech market realizes that and evolve quickly, instead of waiting for some battery breakthrough.

Never forget about the Andy Bernhardt video about the birth and death of javascript.

Those issues are why I will always target C++/java jobs and laugh at anything related to the "web". I am never short of the amount of analogies I can invent about HTML/JS. It's like comparing stick and stones to a decent steam engine.

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

#725
post #689

The answer to all this is: "use Qt". "But camgunz, I only know JavaScript" That's cool! Look into QML. "But camgunz, I only know X" That's cool too! Qt4 has a truly ludicrous number of language bindings: https://en.wikipedia.org/wiki/List_of_language_bindings_for_... . Qt5 has a fair number too: https://wiki.qt.io/Language_Bindings . "But camgunz, I need an embedded browser" I agree, separate windows are for savages.…

but but camgunz isn't the commercial license like a new house, three kidneys, and your cat? 3,540.00 USD to be exact :P ... each year to be exact :P

You don't need the commercial license to use Qt commercially.

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

#726
post #75

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…

Yeah! We should go back to native editors, like Eclipse or IDEA!

Seeing the resources taken for a simple text editor, I crave to see what a full-blown IDE (whic is what Eclipse and IDEA are) written with web technologies would eat up.

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

#727
post #614

Earlier quoted context omitted.

I don't think it's fair to blame the OS for driver crashes. Those are a result of third parties and can happen on any platform.

That varies on the OS/driver/hardware, but IMO, the new AMD graphics drivers being in the kernel tree are the way to go, or something similar like a partnership between MS/AMD/Nvidia. As a consumer it's incredibly frustrating to have a buggy driver and not know who is responsible. Is it MS? Windows comes with a lot of drivers so blaming MS seems fair. Is it the hardware manufacturer? Sometimes you can get the latest…

Many vendors do use the Windows Update system. Looking at my old Windows 10 box, in the last three months it's received display driver updates from Intel and nVidia (it's an Optimus system so yay, twice the driver update joy). It's also got a mouse driver update from something called ELAN.

Also, Windows has this thing called minidrivers where Microsoft essentially writes a chunk of your driver for you (the generic chunk), and you only have to write the bits specific to your device. The idea is that Microsoft could QA their drivers better than J. Random OEM ever could, and so this'd reduce cost for OEMs and also make the Windows platform more stable.

https://msdn.microsoft.com/en-us/windows/hardware/drivers/ge...

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

#729
post #95

Earlier quoted context omitted.

Lots of emacs functionality runs via its lisp VM. I'd hardly call that 'native'. I mean, Emacs had jokes about being bloated decades before Javascript (and Java, another contender for these jokes) even existed. :)

Most of those jokes are completely out of date. "Eight Megs and Constantly Swapping" used to be a big deal, but today it's not. I don't think running Elisp in Emacs takes away from it being "native." At least insofar as there are no popular text editors (that I know of!) which expect you to compile your plugins and macros to native code. They all have interpreters of one kind or another. What Emacs doesn't have, thou…

Of course - I should have added that I don't neccessarily share the sentiment behind those jokes (quite the contrary). For me they are just inevitable (social) indicators for "non-native" software (i.e. I'd say anything with significant code running through an intermediate representation or virtualization at runtime).

As such I simply found emacs an odd choice as an example.

BTW: Notepad++ uses .dlls as plugins. (Which doesn't neccessarily make it a better editor than emacs :) )

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

#730

Earlier quoted context omitted.

If you learn React, you can write for web, multi-platform desktop and (native) mobile, with React Native. Same can't be said for Qt or WPF. Also the Qt community is minute compared to the JS community, that is significant.

As someone who maintain other peoples code I really don't look forward to deal with js a few years from now: What build system did they use? Where is that package? Does it even exist anymore. Etc. Had similar problems trying to maintain a delphi project as an almost fresh from scool developer. At that point I understood the value of Java and Maven.

Typically in Javascript, you would use npm's package.json for building, or you would use npm to install some well defined version of some build system, like you do for other packages. Like Maven builds, it works smoothly and predictably.
Post reply on HN