• Windows Latest discovered Discord and other Chromium and Electron-based applications with high RAM usage
  • RAM usage spikes from 1GB to 4GB on Discord both in and out of voice chat

top 97 comments

sorted by: hot top controversial new old
[+] 125 points 11 months ago (8 children)
  • [–] 53 points 11 months ago (5 children)

    Yes, it runs a separate browser instance for each electron program. Many of the programs that use it could just be a PWA instead.

  • source
  • parent
  • hideshow 5 child comments
  • [–] 45 points 11 months ago

    This is what bothers me so much... Browsers should be improving their PWA implementation (looking at you, Firefox) and electron apps should be PWAs more often. Another decent middle ground Is Tauri. SilverBullet and Yaak are both so much lighter and better than anything else on my system.

  • source
  • parent
  • [–] 9 points 11 months ago* (1 child)

    I wonder how much exact duplication each process has?

    https://www.kernel.org/doc/html/latest/admin-guide/mm/ksm.html

    Kernel Samepage Merging

    KSM is a memory-saving de-duplication feature, enabled by CONFIG_KSM=y, added to the Linux kernel in 2.6.32. See mm/ksm.c for its implementation, and http://lwn.net/Articles/306704/ and https://lwn.net/Articles/330589/

    KSM was originally developed for use with KVM (where it was known as Kernel Shared Memory), to fit more virtual machines into physical memory, by sharing the data common between them. But it can be useful to any application which generates many instances of the same data.

    The KSM daemon ksmd periodically scans those areas of user memory which have been registered with it, looking for pages of identical content which can be replaced by a single write-protected page (which is automatically copied if a process later wants to update its content). The amount of pages that KSM daemon scans in a single pass and the time between the passes are configured using sysfs interface

    KSM only operates on those areas of address space which an application has advised to be likely candidates for merging, by using the madvise(2) system call:

    int madvise(addr, length, MADV_MERGEABLE)
    

    One imagines that one could maybe make a library interposer to induce use of that.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 6 points 11 months ago

    I tried the PWA route with Discord. It wouldn't stay logged in, and acted generally janky. That said, I do PWA with any app that's Electron, at least to try and avoid the RAM bloat.

  • source
  • parent
  • [–] 5 points 11 months ago

    Or, even better, let’s start developing for separate platforms again, and optimise software for the platform that’s going to be running it. Rather than just developing everything for Chrome.

  • source
  • parent
  • [–] 9 points 11 months ago (1 child)

    maybe a toggle to choose between "take some extra RAM, I'm feeling generous" and "fuck you, I'm computing shit over here" could be used to let the app know your current mood / needs ...

  • source
  • parent
  • hideshow 1 child comment
  • [–] 11 points 11 months ago*

    Memory hogging browsers usually do release memory when pressured. You can take it further by getting extensions that unload unused tabs.

    The problem is electron apps that load the whole browser core over and over.

  • source
  • parent
  • [–] 67 points 11 months ago (2 children)

    Miss times when 4 gigs of ram was more than enough for browsing and playing game at the sane time

  • source
  • hideshow 2 child comments
  • [–] 165 points 11 months ago* (18 children)

    If there's any silver lining to this, perhaps we can get a renewed interest in efficient open-source software designed to work well on older hardware, and less e-waste.

  • source
  • hideshow 18 child comments
  • [–] 81 points 11 months ago* (2 children)

    Morgan Freeman: ”They couldn’t”

    I wish we could, but it’s tough to maintain optimism in the face of these sociopathic corporations’ seemingly ever-growing power

  • source
  • parent
  • hideshow 2 child comments
  • [–] 32 points 11 months ago (1 child)

    Open source developers are just like you and me. They'll get fed up with the bullshit and start developing things they need with the resources they have, just like they've always done.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 35 points 11 months ago* (1 child)

    If there’s any silver lining to this, fuck JavaScript, fuck JavaScript wrappers and fuck all people picked JavaScript for the programming language of anything cross-platform.

    It’s unbelievable I would need 6 gbs of RAM to say a simple “hello” to my friends. It used to take 300kb with IRC.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 20 points 11 months ago (4 children)

    I’d love to see games do this because they are clearly not being optimized. Can’t wait to see that not happen.

    Good thing, I’m happy with retro games and the occasional indie.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 9 points 11 months ago (3 children)

    3/5 of the way through 100% Final Fantasy II. Figure by the time I catch up to modern final fantasy either hardware will be better again or people will optimize again. Either way I got time

  • source
  • parent
  • hideshow 3 child comments
  • [–] 1 point 11 months ago (2 children)

    US 2 or JP 2?

    US 2 is so good, but the late game seeed to have a difficulty spike so I never finished it.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 11 months ago (1 child)

    I'm doing the pixel remasters which I think are based more on original JP. I know some purists look down on them but I think overall they're a solid version.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 5 points 11 months ago (3 children)

    Why spend time making better software when the end user can just buy better hardware!

  • source
  • parent
  • hideshow 3 child comments
  • [–] 7 points 11 months ago (2 children)

    That's been the thinking for the last couple of decades at least. But it can't continue if people can't afford new hardware.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 45 points 11 months ago (3 children)

    I normally reply with a tux penguin but, is it really a Windows problem if the it's the apps that aren't optimized for shit?

  • source
  • hideshow 3 child comments
  • [–] 38 points 11 months ago (1 child)

    Indeed, and Electron is not specific to Windows

  • source
  • parent
  • hideshow 1 child comment
  • [–] 6 points 11 months ago

    Yep. My 64 gigs of RAM died in my old setup a few weeks ago, and instead of paying out the ass for replacement DDR4 RAM, I decided to pay out the ass for DDR5 RAM and upgrade while I was at it. Only did 32 gigs, because I really wasn't using most of my 64 gigs (I thought). A few days ago, I ended up having to set up a swap file because a Rust project I was working on kept crashing VSCode while it was running the analyzer. What are we doing here.

  • source
  • parent
  • [–] 25 points 11 months ago

    Windows itself is inherently unoptimized these days with its AI search powered start menu and settings pages that are actually electron web apps. Linux uses 3+ less gb of RAM on just desktop after I switched. So really it's a both problem. Both windows and the programs need a rethink

  • source
  • parent
  • [–] 42 points 11 months ago

    I wouldn't mind them all using HTML for UI if they'd learn to share the same one, and only load it when they need to show me something.

    No, Razer, your "mouse driver" does not need to load Chrome at all times, when I'll only ever look at it once.

  • source
  • [–] 32 points 11 months ago (3 children)

    I remember how the combination of Internet mass distribution of file data and the blossoming gray market for file-share applications really super-charged the technology of file compression.

    I wonder if we'll see skyrocketing RAM prices put economic pressure on the system bloat rampant through modern OSes.

  • source
  • hideshow 3 child comments
  • [–] 10 points 11 months ago (2 children)

    Isn't the bloat basically being coded by the same ai that's eating up the ram to begin with?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 15 points 11 months ago (1 child)

    I mean, ymmv. The historical flood of cheap memory has changed developer practices. We used to code around keeping the bulk of our data on the hard drive and only use RAM for active calculations. We even used to lean on "virtual memory" on the disk, caching calculations and scrubbing them over and over again, in order to simulate more memory than we had on stick. SSDs changed that math considerably. We got a bunch of very high efficiency disk space at a significant mark up. But we used the same technology in our RAM. So there was a point at which one might have nearly as much RAM as ROM (had a friend with 1 GB of RAM on the same device that only had a 2 GB hard drive). The incentives were totally flipped.

    I would argue that the low-cost, high-efficiency RAM induced the system bloat, as applications could run very quickly even on a fraction of available system memory. Meanwhile, applications that were RAM hogs appeared to run very quickly compared to applications that needed to constantly read off the disk.

    Internet applications added to the incentive to bloat RAM, as you could cram an entire application onto a website and just let it live in memory until the user closed the browser. Cloud storage played the same trick. Developers were increasingly inclined to ignore the disk entirely. Why bother? Everything was hosted on a remote server, lots of the data was pre-processed on the business side, and then you were just serving the results to an HTML/Javascript GUI on the browser.

    Now it seems like tech companies are trying to get the entire computer interface to be a dumb terminal to the remote data center. Our migration to phones and pads and away from laptops and desktops illustrates as much. I wouldn't be surprised if someone finally makes consumer facing dumb-terminals a thing again - something we haven't really experienced since the dawn of personal computers in the 1980s.

    But TL; DR; I'd be more inclined to blame "bloat" on internet web browsers and low cost memory post '00s than on AI written-code.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 11 months ago

    I mean, ymmv. The historical flood of cheap memory has changed developer practices. We used to code around keeping the bulk of our data on the hard drive and only use RAM for active calculations. We even used to lean on "virtual memory" on the disk, caching calculations and scrubbing them over and over again, in order to simulate more memory than we had on stick. SSDs changed that math considerably. We got a bunch of very high efficiency disk space at a significant mark up. But we used the same technology in our RAM. So there was a point at which one might have nearly as much RAM as ROM (had a friend with 1 GB of RAM on the same device that only had a 2 GB hard drive). The incentives were totally flipped.

    I would argue that the low-cost, high-efficiency RAM induced the system bloat, as applications could run very quickly even on a fraction of available system memory. Meanwhile, applications that were RAM hogs appeared to run very quickly compared to applications that needed to constantly read off the disk.

    Internet applications added to the incentive to bloat RAM, as you could cram an entire application onto a website and just let it live in memory until the user closed the browser. Cloud storage played the same trick. Developers were increasingly inclined to ignore the disk entirely. Why bother? Everything was hosted on a remote server, lots of the data was pre-processed on the business side, and then you were just serving the results to an HTML/Javascript GUI on the browser.

    Now it seems like tech companies are trying to get the entire computer interface to be a dumb terminal to the remote data center. Our migration to phones and pads and away from laptops and desktops illustrates as much. I wouldn't be surprised if someone finally makes consumer facing dumb-terminals a thing again - something we haven't really experienced since the dawn of personal computers in the 1980s.

    It is definitely coming and fast. This was always Microsoft’s plan for an internet only windows/office platform. Onedrive and 365 is basically that implementation now that we have widespread high speed internet.

    And with the amount of SaaS apps the only thing you need on a local machine is some configuration files and maybe a downloads folder.

    Look at the new Nintendo Switch cartridges as an example. They don’t contain the game, just a license key. The install is all done over the internet.

  • source
  • parent
  • [–] 30 points 11 months ago (5 children)

    Limitation breeds innovation

  • source
  • hideshow 5 child comments
  • [–] 9 points 11 months ago (3 children)

    Like a rust based alternative to VSCode

    https://zed.dev/

  • source
  • parent
  • hideshow 3 child comments
  • [–] 5 points 11 months ago* (last edited 11 months ago)

    VSCode history is so messed up. Microsoft buys github and stops production of github team's IDE, then uses the framework developed for that IDE to make VSCode.

    Fucking 1600s colonizer behavior.

  • source
  • parent
  • [–] 29 points 11 months ago (7 children)

    Tauri is the way to go ; so that every app doesn't each embed another web browser that makes for 90% of the file size.

  • source
  • hideshow 7 child comments
  • [–] 5 points 11 months ago (5 children)

    Is the Rust backend mandatory?

  • source
  • parent
  • hideshow 5 child comments
  • [–] 16 points 11 months ago (3 children)

    In Tauri, the rust backend is the glue between web/js and OS functions. Yet you don't need to do any rust code, it's delivered ready.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 2 points 11 months ago (2 children)

    If your app interfaces with the OS, like most apps would (reading a file, managing the window, etc), then you would be writing rust, no?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 5 points 11 months ago (1 child)

    Let's say you are a webdeveloper trying to package your js app into a executable.

    Tauri makes it so that it embeds your js into a rust base, and if you need to interact with the os, you have a Tauri JS API which calls predefined rust functions embedded in the executable.

    You can literally never write rust code while using tauri.

    But they givr you the choice, since rust is faster than compiled js, you also can create rust functions which you then call from your js code.

  • source
  • parent
  • hideshow 1 child comment
  • load more comments (1 reply)
  • [–] 2 points 11 months ago

    Tauri doesn't automatically make apps perform good. Easy and common pitfalls still can make it go to a crawl just like electron.
    Yaak is an example of a tauri app that performs horribly, and that can't reach a satisfactory 30fps on modern hardware. The issue is within how tauri interacts with the js world and syncs state.

  • source
  • parent
  • [–] 58 points 11 months ago (3 children)

    The proliferation of electron programs is what happens when you have a decade of annoying idiots saying "unused memory is wasted memory," hand-in-hand with lazy developers or unscrupulous managers who are externalizing their development costs onto everybody else by writing inefficient programs that waste more and more of our compute and RAM, which necessitates the rest of us having to buy even better hardware to keep up.

  • source
  • hideshow 3 child comments
  • [–] 19 points 11 months ago (2 children)

    annoying idiots saying "unused memory is wasted memory,"

    The original intent of this saying was different, but ya it's been co-opted into something else

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 11 months ago (1 child)

    So what was the original saying? As I see it, this phrase is wrong no matter how you look at it. Because all ram is used at all times, for example if you have 32GB of free ram, the kernel will use all of it as a page cache to speed up the file system. The more free ram you have the more files can be cached, avoiding access to the disk when you read them.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 20 points 11 months ago (4 children)

    And here I am resurrecting Dell laptops from 2010 with 1.5gb DDR RAM and Debian

  • source
  • hideshow 4 child comments
  • [–] 10 points 11 months ago (3 children)

    I remember when they changed the backronym for Emacs from "Eight Megabytes And Constantly Swapping" to Eighty. Megabytes. Or when a Netscape developer was proud to overtake that memory use.

    What's the point of more RAM and faster processors if we just make applications that much less efficient?

  • source
  • parent
  • hideshow 3 child comments
  • [–] 9 points 11 months ago (2 children)

    "unused ram is wasted ram"

    yeah yeah yeah, great. but all you motherfuckers did that and i'm fucking out of ram.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 11 months ago

    This phrase is just plain wrong. Unused ram is used for the page cache by the kernel. You must always have some ram free or else the whole system will not operate without a page cache. Larger page cache allows to cache more files from the file system.

  • source
  • parent
  • [–] 17 points 11 months ago

    Native apps are so much better, on every platform.

    The JavaScript must flow….

  • source
  • [–] 30 points 11 months ago

    Windows Latest discovered Discord and other Chromium and Electron-based applications with high RAM usage

    Lol, this is news? Where have they been the last 15 years?

    In other news, the sky is blue.

  • source
  • [–] 14 points 11 months ago (2 children)

    And the Apollo was launched with 4KB of ram.

  • source
  • hideshow 2 child comments
  • [–] 26 points 11 months ago (3 children)

    Yeah, the RAM shortage is definitely to blame on Electron. Won't someone please think of the poor AI companies who have to give an arm and a leg to get a single stick of RAM!

  • source
  • hideshow 3 child comments
  • [–] 13 points 11 months ago (1 child)

    Just for reference: My Current cpu (5700x3d) has more cache than my windows 98 computer had ram. And win98 wasn’t that bad.

  • source
  • hideshow 1 child comment
  • [–] 13 points 11 months ago

    cough Windows START MENU cough cough

  • source
  • [–] 31 points 11 months ago (4 children)

    It's because people want cross-platform apps and web is the easiest way to do it. Yes, you have Flutter, KML or Qt but those are often hard to work with (looking at you, Flutter) or it's difficult to find devs that can work with them. You choose web (JS/wasm) and you have plenty of devs familiar with the tools and you can support all the platform easily. I'm using Tauri for my personal projects because it's fun and easy. I could use Qt but I don't want to work with C++ or Python, at least not in my spare time. If anyone can recommend me a nice framework supporting Linux and Android and using modern language I might switch. I haven't found one.

  • source
  • hideshow 4 child comments
  • [–] 6 points 11 months ago

    I have been really enjoying working with Avalonia, it is a .NET library that works across windows, Linux, and Mac and allows you to use C# for desktop app development on those environments. Its what MAUI should have been.

  • source
  • parent
  • [–] 15 points 11 months ago (1 child)
  • [–] 7 points 11 months ago (5 children)

    Thank Google for those cool products.

  • source
  • hideshow 5 child comments
  • [–] 4 points 11 months ago (2 children)

    what's google got to do with it? this is an article about a product develeped at GitHub (now a microsoft subsidiary) causing problems with Windows and the thumbnail is showing produts from the following companies:

    • facebook
    • discord
    • microsoft
    • microsoft
    • microsoft
    • microsoft

    like. look. i hate google. they partner with israel to conduct genocide (don't use waze, btw, or better yet, don't use any google products). but this seems like not looking at the whole of how evil all of big tech is just to focus on how evil one company in big tech is

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 11 months ago* (last edited 11 months ago)

    The article mentions Chrome/Chromium: 9 times
    The article mentions Google: 0 times

    Google made Chrome. Chrome had that multi-process architecture at its core which allowed to consume as much memory as needed even on 32-bit OS. Chromium was always inside it and open source. Then they created CEF, which allowed webdevs to build "real" apps, and that opened the floodgates. Electron was first built on it but they wanted to include Node and couldn't because it required too much experience in actual coding. So they switched to Chromium. It didn't change much in the structure, just basically invited more webdevs to build more "real" apps (at 1.0 release Electron advertised hundreds of apps built with it on its website).

    Google could do something about how the web engine works in frameworks (that don't need that much actual web functionality), but didn't. They invited webdevs to do anything they want. Webdevs didn't care about security because mighty Google would just publish new Chromium update eventually. They never realized they don't need more security in their local "real" apps gui that connect to their websites because there is not much room for security danger in such scenarios. They just always updated the underlying engine because why not. Chromium dll is now at 300 mb or something? All of that code is much needed by everyone, is it not?

    So, for me the sequence was always seen as this:

    Google (caring about webdevs, not OS) ->

    Webdevs (not caring about native code and wanting to sell their startup websites by building apps) ->

    Reckless web development becoming a norm for desktop apps ->

    Corporations not seeing problems with the above (e.g. Microsoft embedding more stuff with WebView2 aka Chromium)

    So yes, Google has everything to do with it because it provided all the bad instruments to all the wrong people.

    Personally, I don't care much about hating Microsoft anymore because its products are dead to me and I can only see my future PCs using Linux.

  • source
  • parent
  • load more comments (-1 replies)
  • [–] 6 points 11 months ago* (last edited 11 months ago)

    Way ahead of you Luddites

    edit

    https://www.reddit.com/r/pcmasterrace/comments/ukwjwa/anyone_remember_this_scam/

    first link died for some reason, probably not enough RAM

  • source
  • [–] 6 points 11 months ago (4 children)

    I have couple of old 8 gb sticks from my old 960 GPU pc. Is there any way for me to stick it onto my new pc and have only certain app use it and nothing else?

  • source
  • hideshow 4 child comments
  • [–] 5 points 11 months ago*

    Only for multi CPU mobos (and that would be pinning a thread to a CPU/core with NUMA enabled where a task accessed local ram instead of all system ram). Even then, I think all ram would run at the lowest frequency.
    I've never mixed CPUs and RAM speeds. I've only ever worked on systems with matching CPUs and ram modules.

    I think the hardware cost and software complexity to achieve this is beyond the cost of "more ram" or "faster storage (for faster swap)"

  • source
  • parent
  • [–] 3 points 11 months ago

    As to whether it's possible to get certain apps use specific physical RAM sticks, I am not sure, but that seems unlikely and would probably require some very low level modifications to your operating system. But even before you get to that point you'd have to physically connect them to your new motherboard, which will only work if there are both free RAM slots on it, and your new motherboard has slots for the same generation of RAM that your old PC uses.

  • source
  • parent
  • [–] 13 points 11 months ago* (2 children)

    Meanwhile, on my Linux system I use about 20% of my ram idling around and it doesn't really budge. I've only got 16gb

  • source
  • hideshow 2 child comments
  • [–] 12 points 11 months ago

    I left windows just 2 months ago to use a MacBook for work.

    In both computers I had 16gb of ram.

    Windows usage was significantly higher in regard to ram usage.

    I use today Linux is way more efficient, but after seeing similar efficiency with Mac, I’m changing my language to say Windows is extremely inefficient.

  • source
  • parent
  • [–] 7 points 11 months ago

    I brought a laptop from 2003 back from the stone ages. It runs surprisingly well, is up to date, and only really struggles with web stuff because of the state of things.

    Antix linux running on 2GB ram, Pentium m 1.4GHz, and an SSD in an IDE enclosure. Uses about 200mb of ram. As far as being functional, the screen is small and low res, and it doesn't do these newfangled video formats. But if you consider 90% of my work life is in spreadsheets and documents and low resource applications, it really could be just fine. I'm not saying I would enjoy it if it was all I had to use, but I could if I needed to.

  • source
  • parent
  • load more comments
    view more: next ›