7 ms·
Can anything running on Electron be classified as simple? Just saying. (yes, I am that guy in this case) I like the idea behind it though.
by stanski 7y ago
Can anything running on Electron be classified as simple? Just saying. (yes, I am that guy in this case)
I like the idea behind it though.
- mumblemumble 7y agoI think that this argument is, frankly, over. Electron is the way to build cross-platform apps that don't merit separate UI code for each platform. Electron wins because Electron apps are able to deliver consistently decent UX, something that never happened with Swing or GTK+ or WxWidgets or whatever. Sure, it eats RAM. It turns out that I care about that so much less than I thought I would. I'm rarely using 100% of my system's RAM these days, so I'm willing to burn a couple hundred MB on widgets continuing to be sensibly drawn and laid out when I resize the window.
- stanski 7y agoI think you're thinking of a different argument. I never said it doesn't provide consistent UX. It's just that when I hear a "simple markdown editor", I don't envision an app with a bundled web browser. I'm sure it looks great and all that.
- mumblemumble 7y agoWhen they say "simple markdown editor", they're pretty obviously not talking about implementation details. They're talking about it being easy to use. As far as the argument goes, I'm not sure they're really separable. If you have an Electron app that markets itself as being simple (as in "easy to use"), and someone says, "No it isn't, because the stack it's built on is complex", their unstated major premise is that implementation details are more important than UI. Leaving it unstated doesn't mean it shouldn't be addressed head-on. One of a syllogism's legs can easily be both tacit and the crux of the argument at the same time.
- ComputerGuru 7y agoText editors don’t need all the widgets and controls. They basically need a context menu (and Electron’s menus are horrible as they provide none of the native OS accelerators and integrations), a open/save dialog (pretty please don’t use a custom UI here!), and maybe a menu/toolbar. The editor itself is custom code (whether html/css/js or native), and that’s where the performance benefits of native code shine best anyway.
- tiborsaas 7y ago> and that’s where the performance benefits of native code shine best anyway That's right, now you just have to deal with open source OpenGL libraries or of course write it yourself. Handle unicode, sub/superscripts, RTL text, typography nuances, LaTeX etc. by yourself. (See more at https://gankra.github.io/blah/text-hates-you/ https://gankra.github.io/blah/text-hates-you/) Also do it in your free time because probably you won't make a living out of it. So I totally understand why anyone would pick a browser engine where all of this is super easy to solve.
- uwotm8trnt 7y agoOf course, there's no middle ground between "using a whole browser engine" and "coding your UI in raw OpenGL". Have you heard of, say, Qt?
- swebs 7y ago>Sure, it eats RAM. It turns out that I care about that so much less than I thought I would. It sure is nice having a powerful developer machine with 16 or 32 gb of RAM. Just remember there are a lot of people out there running on 4gb laptops or even less. These days, the OS, web browser, and Slack alone are already enough to max it out and start swapping.
- mumblemumble 7y agoIf you want to keep your RAM usage light, go ahead and use vim. Other people choosing to use different apps is consuming their computer's memory, not yours. I'm also not sure you can just assume that an Electron app will be a giant memory hog compared to the alternatives. I just decided to go and give it a quick look-see. Right now I've got both vscode and IntelliJ IDEA open at the same time. (For my purposes, they're at feature parity, except that I don't like vscode's Java plugin). IntelliJ, a non-Electron cross-platform app, is consuming 3 GB of RAM. vscode, an Electron app, is using 50MB. That's 1/60 as much. Meld, a GTK+ app that doesn't do nearly as much, consumes 100MB just sitting idle, which is twice as much as the Electron app does. I'll come out and say it: I suspect that, deep down, this argument is not really about memory or anything like that. It's really a proxy war about JavaScript. Which, I get it, I hate JavaScript too. I resolutely avoid working on things with UIs at work, probably to the detriment of my career, just to avoid programming in JavaScript. But I've also got to concede that Electron has accomplished something that everyone else has consistently failed at: Delivering decent cross-platform GUI applications. And it's pointless to complain about people using X technology when it has no truly viable alternatives.
- deleted 7y ago[deleted]
- zozbot234 7y ago> Delivering decent cross-platform GUI applications. Qt, Gtk+, WxWidgets... There are lots of ways to skin this cat.
- deleted 7y ago
- codedokode 7y agoNot everyone has a system with over 8 or 16 gigabytes of RAM to run such apps.
- mumblemumble 7y agoSo, let's talk with real numbers here. I happen to have a Markdown file open in MacDown, a native application, right now. According to Activity Monitor, it's using 67.1 MB of RAM. I also downloaded Mark Text to take a look at it. So now I've got the same Markdown file open in that app, too. It's using 73.9 MB of RAM. I will admit, that difference in memory consumption is equivalent to seven instances of vim, and I'll keep that in mind the next time I'm trying to get things done on a Raspberry Pi Zero. (As one does.) But, on this 6-year-old computer, which does not have "over 8 or 16 GB of RAM", I'm still not sweating that 6.8 megabytes.
- codedokode 7y agoThat is difficult to believe. I unpacked Linux version of the app, Electron binary is 120 Mb, resources.pak is 8 Mb, ICU library is 10 Mb. How can a whole Electron app take just 74 Mb? The numbers don't add up. To test it myself, I started the program (with --no-sandbox because it requires root privileges otherwise) and measured memory usage using smem: $ sudo smem --userfilter=nobody -k --totals PID User Command Swap USS PSS RSS 23365 nobody /tmp/.mount_markteqQvqZF/ma 0 6.3M 14.2M 37.7M 23388 nobody /tmp/.mount_markteqQvqZF/ma 0 46.6M 59.4M 90.9M 23363 nobody ./marktext --no-sandbox 0 53.3M 76.3M 118.4M 23392 nobody /tmp/.mount_markteqQvqZF/ma 0 121.1M 142.3M 183.0M PSS (Potential Set Size) [1] numbers are additive unlike RSS, so we can sum them and get around 291 Mb of RAM. This counts pages, that are shared between several processes, only once. Either MacOS uses RAM several times more effective than Linux, or Activity Monitor is showing incorrect numbers to make impression that Mac apps take less memory than apps on competing operating systems. [1] https://en.wikipedia.org/wiki/Proportional_set_size https://en.wikipedia.org/wiki/Proportional_set_size
- mihaela 7y ago"Electron apps" Wrapped web engine and the site does not an app make.
- prakis 7y agoI doubt you even need a desktop app for simple markdown editor. Just a browser tab is good enough https://markdown.site https://markdown.site
- tiborsaas 7y agoCan any car described as comfortable and family friendly which run on gas?
- NoGravitas 7y agoI mean, in the long run, fossil fuel usage is going to make your family pretty miserable, so probably not.
- swebs 7y agoSure. You're just not allowed to claim it's lightweight.
- marmada 7y agoCan we focus on the actual product. I feel like this discussion comes up every time and it's not interesting. And yes, Electron isn't simple. No one cares. The product itself is simple to use (presumably). When they said simple, they were not referring to implementation details.