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

The waste of slow JS bundles is nothing compared to the cost of bloated interpreted runtimes or inefficient abstractions. Most production software is multiple orders of magnitude slower than it needs to be. Just look at all the electron apps that use multiple GB of ram doing nothing and are laggier than similar software written 40 years ago despite having access to an incredibly luxurious amount of resources from any sane historical perspective.


Something I realized while doing more political campaign work is how inefficient most self hosted solutions are. Things like plausible or umami (analytics) require at least 2 gigs of ram, postiz (scheduled social media planner) requires 2 gigs of ram, etc.

It all slowly adds up where you think a simple $10 VPS with 2 gigs of ram is enough but it's not, especially if you want a team of 10-30ish to work sporadically within the same box.

There can be a lot of major wins by rewriting these programs in more efficient languages like Go or Rust. It would make self hosting more maintainable and break away from the consulting class that often has worse solutions at way higher prices (for an example, one consulting group sells software similar to postiz but for $2k/month).


So you have free software that requires 2 GB of RAM and the alternative is $2k per month and you're complaining that the free solution is inefficient? Really?

Why do you expect to be able to replace a 2k/month solution with a $10/month VPS?


Because the fundamental task many of these programs are doing is neither complicated nor resource intensive.

In the age of cheap custom software solutions everyone should at least try to make something themselves that's fit for purpose. It doesn't take much to be a dangerous professional these days, and certainly more than ever before can a dangerous professional be truly dangerous.


Thank you, I get so confused when people think a $5/vps shouldn't be able to do much. We're talking about 99% of small business that might have 5 concurrent users max.

2 gigs of ram should be considered overkill to cover every single business case for a variety of tools (analytics, mailer/newsletter, CRM, socials, e-commerce).


Your criticism contradicts itself.

He's saying that the software seems free, but is so inefficient that it bloats other costs to run it. And he never said he wanted to replace $2K/month with $10/month.


I'm not saying it's so bad I don't recommend it, quite the opposite; but these things can be written in more performant languages. There's no reason why a cron job scheduler requires 500 mb of ram in idle. Same for the analytics. That is just a waste of resources.

Software can be drastically way less resource intensive, there is no excuse outside of wanting to exacerbate the climate crises.

This period of our history in the profession will be seen as a tremendous waste of resources and effort.


Dude you're complaining about the efficiency of free software.

Go write the software yourself, no one owes you anything.

Maybe if you had to actually write it yourself, you'd quickly figure out why people prefer "inefficient" languages for these things.

A cron job scheduler does not in fact require 500 MB of memory. You're just being disingenous, that software is doing a lot more than just that.


I am writing software myself and your attitude is just weird. We should always strive for better more efficient software, the climate crisis is a real thing and our industry has done an excellent job exacerbating it with more inefficient tools, libraries, and languages.

People prefer JS because all they know is JS, it's that simple. Please tell me why you think devs choose JS, I'm legitimately curious but your attitude of constant dismissal and disparagement makes it seem you just want to beat people down and not engage.


People choose JS because it’s the only first class browser language. Why they choose it on the backend I honestly couldn't tell you.


Dude, the $2k solution is not only worse than postiz they charge an additional thousand for each channel.

It's just garbage software, I brought it up as an example IDK why. Commentators here like knowing snippets about other industries in the profession, I know I do at least.

But to answer your Q, yes I do expect a cron job schedule, analytics, and a CRM not to require 8 gig of ram in order to not barf on itself too hard.

These things are incredibly resource intensive for their actual jobs. The software is incredibly wasteful.

A $5/vps should be enough to host every suite of software a small business needs. To think otherwise is extremely out of touch. We're talking about 3 concurrent users max here, software should not be buckling under such a light load.


> A $5/vps should be enough to host every suite of software a small business needs

Where is this weird expectation coming from?

Why should that be the case?


The expectation is that these aren't complicated tools, they should not command that many resources. Why do you think a $5/vps with half a gig of ram can't handle basic CRON/background jobs or management software? 512 mb of ram can do so much if you choose the appropriate tools but if you start with a weak foundation that requires 512 mb of ram to just stay idle it hurts a class of users that could benefit from this software.

These things aren't complicated, but when you choose NodeJS/Javascript they become way more complicated than expected. I say this as someone who has ever worked professionally with JS and nothing else for a 15 year long career.

Writing software that can only be used by the affluent is not the direction I want our industry to go in.


I guess there's the distinction between capacity that could be taken up by other things, and free capacity that doesn't necessarily cost anything.

For a server built in the cloud those cycles could actually be taken up by other things, freeing the system and bringing costs down.

For a client computer running electron, as long as the user doesn't have so many electro apps open that their computer slows down noticeably, that inefficency might not matter that much.

Another aspect is that the devices get cheaper and faster so today's slow electron app might run fine on a system that is a few years away, and that capacity was never going to be taken up by anything else on the end user's device.


It’s more likely that Electron app uses poor code and have supply chain issue (npm,…). Also loading a whole web engine in memory is not cheap. The space could have been used to cache files, but it’s not, which is inneficient especially when laptops’ uptime is generally higher.


Don't forget the human time wasted by an app being slow and laggy.


> Most production software is multiple orders of magnitude slower than it needs to be.

at least 100x slower than it needs to be?


Easily. Lots of things can take 3ms that actually take 300ms. Happens all the time.


what's an example?


A poorly written SQL query, an algorithm on large data sets using suboptimal bigO, the Home Depot or Lowe's website search bars, etc


good examples, i agree


Why are electron apps memory intensive compared to other cross platform frameworks. Is it language, UI system or legacy?


Electron apps tend to use a lot of memory because the framework favors developer productivity and portability over runtime efficiency.

- Every Electron app ships with its own copy of Chromium (for rendering the UI) and Node.js (for system APIs). So even simple apps start with a fairly large memory footprint. It also means that electron essentially ships 2 instances of v8 engine (JIT-compiler used in Chromium and NodeJS), which just goes to show how bloated it is.

- Electron renders the UI using HTML, CSS, and JavaScript. That means the app needs a DOM tree, CSS layout engine, and the browser rendering pipeline. Native frameworks use OS widgets, which are usually lighter and use less memory.

- Lastly the problem is the modern web dev ecosystem itself; it is not just Electron that prioritises developer experience over everything else. UI frameworks like React or Vue use things like a Virtual DOM to track UI changes. This helps developers build complex UIs faster, but it adds extra memory and runtime overhead compared to simpler approaches. And obviously don't get me started on npm and node_modules.


Loading a browser context isn't helping.


Imagine the amount of useful apps that would not have been made without Electron.




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

Search: