Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Please don't blame Electron. VS Code is an Electron-based application and it runs beautifully, with much less RAM/CPU hoarding than Slack.

I only run Slack in a Chrome tab now.



I feel like it's still right to blame Electron - it coerces developers into being lazy as it stops them from having to actually think about how their apps behave and what resources they consume. Not to mention that it encourages platform-hostile user interface design in the name of "portability".

Damnit, HTML and JavaScript were never meant for this kind of abuse.


the users needs should be prioritized over the "platform" while I agree with the overall message here... I hate hate hate how my MacBook "Pro" regularly hits the 8gb limit. Very obnoxious


By prioritising the platform, you also prioritise the user. As a macOS user, I am happy with how the average macOS application behaves and looks and feels and I feel like application developers should respect that.

Same for someone writing a UWP application for Windows 10, or an Android app. You don't win by degrading the experience on all of your target platforms because it's "easier", you win by carefully considering the people who actually will be using your software and the circumstances under which your application will run.


Not really... it's still considerably slower than Sublime, Gedit/Pluma (or anything gtksourceview), vim, and others, and VS Code got to where it is today due to much gnashing of teeth

I would love to see Electron abandoned...


> it's still considerably slower than Sublime

This does not match my experience. Sublime + Plugins to bring it to parity with VSCode === much slower than VSCode. Especially with larger files.


Wouldn't know, I don't use plugins. I would imagine that to be the case though, given that it's extra code from third parties. Similar slowdown is common in nearly all plugin systems.


Oh true. That's an issue for sure. That said - I value the extra bits that VSCode has over Sublime out of the box. Some may not.


What alternative would you propose?


I haven't played with QT's JS backend but that looks nice. (It's C++ native)

pyGTK is a good toolkit.

On the JVM side of things there's JavaFX

Almost anything is better than bundling webkit really... even WinForms. And the above list is mostly new stuff for new devs. For the real programmers amongst us there's QT, GTK, JVM's Swing...


Do you have an example app in production that cross compiles to all platforms? Also, what constitutes a real programmer?


> Also, what constitutes a real programmer?

People that aren't afraid of the hard stuff, and don't need software to wipe their ass?

As for software... IntelliJ IDEA (Swing), we use internal pyGTK stuff that runs on Win/Mac/Lin, Wireshark (QT), Mozilla Firefox (XUL ... another brilliant UI markup language which died for no good reason), pgAdmin III (wxWidgets)

On the music plugin side of things there is a lot of VSTs written in JUCE framework, another good cross-platform UI kit which focused on audio software.


People that aren't afraid of the hard stuff, and don't need software to wipe their ass?

Exactly the sort of shitty attitude that will get us nowhere.

I have seen a plethora of QT, GTK and other cross-platform applications that weren't only laggy as shit, but riddled with UI bugs.

I fucking hate that Electron is now an accepted way to build applications, believe me – but the reason we ended up in this situation is because "real programmers" failed to develop a framework that effectively dealt with developer and user needs.


Well its the only attitude that is left after one's opinions and practices are continuously railroaded by excess industry profiteering and need for "change". Sure, nobody stands up to defend the bad attitude but how can one have anything else when all you see are perfectly good things thrown away because they're not shiny enough? I'm sick of watching this field serve shit for dinner and I have no problem with making people feel bad for their bad decisions. Don't want to get made fun of? Don't do things worthy of being made fun of. (The peanut gallery is always watching.)

Anyways, it shouldn't be the job of the toolset to prevent bad users from shooting themselves, therefore you are always going to have bad, laggy programs in any UI paradigm. It is the job of the toolset, and those that built it, to not take any one piece of tech too far (in this case, HTML rendering engines) when there are so many acceptable and superior substitutes.


Damn. I better change my info online and stop people I'm a programmer. Better notify all sorts of census and demographic departments. We have been over accounting programmers in the tens of millions, if not hundreds of millions!


> On the music plugin side of things there is a lot of VSTs written in JUCE framework, another good cross-platform UI kit which focused on audio software.

Real audio programmer here.

I used nw.js (essentially like Electron without the necessity to do IPC for intra-window communication) to port the frontend for a realtime audio engine written in C. Frontend and business logic speak over a socket.

No need for JUCE because the UI has no need for JUCE's audio tools.

Port could happen extremely fast because of the brilliance of Chromium devtools-- introspection and real time updating of styles/DOM state was a life saver. This was a port from tcl/tk which had (has?) a half-baked theme-ing engine and no easy way to introspect the contents of a Tk Canvas.

Qt would have been nice but the frontend is a visual diagram with boxes connected by Bezier curves. QML doesn't have an easy way to do that without the performance scaling with the size of the logical canvas (which is unacceptable because users sometimes want enormous logical canvas sizes).


What if someone told you that using Swing, QT, and GTK were all bad, rsource-wasting things made for people that "need software to wipe their ass", and that "real programmers" use butterflies? Check this out to better understand the "no true scottsman" fallacy: https://www.xkcd.com/378/

You're just hating on something new and praising some old things, but in the past, those same things were also hated on for the same reasons (e.g. so many people hated on swing and java in general early on for wasting memory; "real programmers don't use Java")

Each electron app spawning up separate instances of chrome is totally wasting memory. Argue about that, instead of "real programmer" bs


What a novel concept! I feel so edumacated now. Surely my IQ rose by a few points.

And to follow-up edit, of course theres no one true scotsman. The assembly-reciting graybeards look down at GUI programmers, who look down on the webdevs, who really don't have anyone to look down upon because they still have so much to learn.

And why does the argument always have to be about resource consumption? Does anybody actually even truly care? I hate Electron because it is an incredibly poor use of existing resources and that it leverages tools very inappropriate for the task of creating cross-platform GUI applications. Entire industries are built out of this unholy Frankenstein of duct tape and chicken wire. Now, for the job of quickly banging out an app so the business fucks can make their $$$$$.... now that's different


it is an incredibly poor use of existing resources and that it leverages tools very inappropriate for the task of creating cross-platform GUI applications

… because there aren't better tools.


There are, people just have to step outside their comfort zone to use them.


No. There aren't. There are no good cross-platform development environments. There are a handful which might be acceptable for some user-cases; Electron is unfortunately one of them.

If you think there are a plethora of amazing tools out there that people are using to build cross-platform apps, then you're wrong.


Ok great! Expand on what spedifically makes it less appropriate and what makes alternatives more appropriate.


Qt is C++ native, but if you start using JS you pull in WebKit (or Chrominum, not sure) again, just like Electron. JS and native performance are mutually exclusive.


NativeScript!


XUL 2.0? One can dream :/


NativeScript actually looks really cool. It seems mobile only right now though.


> VS Code is an Electron-based application and it runs beautifully, with much less RAM/CPU hoarding than Slack.

Except for that time when it was constantly using 13% CPU to display the blinking cursor: https://github.com/Microsoft/vscode/issues/22900


To be clear, that was a bug with chrome: https://news.ycombinator.com/item?id=13941293




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: