3 ms·
Some people seem to think that unused ram is good, quite the contrary actually. If you have 50 of these apps running doing work while playing a game while havin
by makkesk8 7y ago
Some people seem to think that unused ram is good, quite the contrary actually. If you have 50 of these apps running doing work while playing a game while having a pc from 10 years ago, then I can actually see a problem. Laptop and battery-driven devices is a whole other matter though.
I like to think the reusability and speed of development with electron is just terrific and is a trade-off that is worth it in the end.
- falcolas 7y agoUnused RAM is good. It lets the OS do things like pre-fetching and caching disc reads. That is, it speeds everything up to not be using all of your RAM. Plus, when you do fill your RAM, you have to start contending with swapping, which slows everything down significantly.
- makkesk8 7y agoSwap is not enabled by default by any OS that I know of. And I doubt any OS requires you to have several gbs free in order to work smoothly. My point being is, we are not stuck with 2 gbs of ram anymore and like games, apps will scale to use more resources for ease of development or better features.
- VonGallifrey 7y agoAs far as I am aware both windows and linux (several distros) use swap by default. On windows it will be a file on the C drive and on Linux it will be a swap partition. Of course they are not going to swap unless they have to, but they will swap in default configuration.
- michaelmrose 7y agoLiterally every major OS in existence has swap enabled by default. Linux, Mac, windows. The alternative is for things to start crashing when you run out of memory rather than swapping out.
- 0815test 7y ago> Linux, Mac, windows. But not Android, iOS or iPadOS. (And for good reason - these OS's run on devices that use bottom-of-the-barrel flash storage and can't sustain the wear-and-tear that comes with using swap.) That's not "literally every major OS"!
- falcolas 7y agoInstead, they suspend applications to the self-same flash storage when the the application is not being actively used and there is memory pressure. Doesn't seem a lot different from swapping the memory to disc until its accessed again. Not to mention, it's kinda irrelevant to a discussion of electron applications.
- 0815test 7y agoThey don't "suspend applications". They can prompt an application to serialize an image of its "core" memory for storage on the flash media and to subsequently restore its state from the serialized memory dump, but very few applications are written to do the job properly.
- michaelmrose 7y agoI care as much about your ease of development as you care about the ease of assembly of your car. If someone told you that your next car was going to get 15 mpg and told you that gas stations are plentiful nowadays you would presumably by a different car.
- michaelmrose 7y ago"Some people seem to think that unused ram is good, quite the contrary actually." Bubkiss. Using ram is an inherent negative that is justified by saving cpu time or disk access. All things being equal if you could do the same job with a fraction of the resources the user would be better of because someone else's bloated app can use that ram or it can be used to cache files. It certainly isn't "wasted" Now using ram to cache files is unequivocally good because as the file exists on disk we can at any time evict it from memory and read it again later. "Laptop and battery-driven devices is a whole other matter though." Wherein a whole other matter is the majority of computers. "If you have 50 of these apps running doing work while playing a game while having a pc from 10 years ago, then I can actually see a problem" Complete strawman. There are probably more people that are poor or cheap running slow devices than fast, This is by no means limited to a tiny number of very old devices. Likd 80% of computers are constrained in terms of battery or ram. "electron is just terrific and is a trade-off that is worth it in the end" What you are actually saying is that you value one developers time over a million users time. The challenge is that it doesn't scale very well. If the user runs 10 apps that use a gb per app a typical 8gb ram machine will be swapping when switching apps and a 4gb which still exists will have stopped working.