• 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
  • kalpol@lemmy.ca
    link
    fedilink
    English
    arrow-up
    4
    ·
    20 minutes ago

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

  • UnderpantsWeevil@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    3 minutes ago

    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.

  • Lightsong@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 hour ago

    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?

    • Logical@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 minutes 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.

  • BlueBockser@programming.dev
    link
    fedilink
    English
    arrow-up
    11
    ·
    3 hours ago

    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!

  • DannyMac@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 hours ago

    I’m tired of this! How can we start our own RAM foundry–is that the right term? Surely there’s a YT tutorial somewhere.

  • Kissaki@feddit.org
    link
    fedilink
    English
    arrow-up
    26
    ·
    edit-2
    7 hours ago

    I guess the prices give us a new kind of issue ticket template; “new RAM is too expensive for me, please consider optimizing”

    Less abstract, more concrete than “take less of a share please”

    • Kairos@lemmy.today
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      2
      ·
      2 hours ago

      Electron should be a system dependency entirely so that every single app doesn’t have to be individually updated whenever there’s a chromium CVE which seems to be weekly.

  • Blackmist@feddit.uk
    link
    fedilink
    English
    arrow-up
    31
    ·
    10 hours 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.

    • A_norny_mousse@feddit.org
      link
      fedilink
      English
      arrow-up
      26
      ·
      10 hours ago

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

      It’s funny; on Linux such devices work perfectly but many users complain that they “aren’t supported” because there’s no UI (that sits uselessly in your notification area and eats memory).

  • ExLisper@lemmy.curiana.net
    link
    fedilink
    English
    arrow-up
    29
    arrow-down
    3
    ·
    10 hours ago

    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.

    • fuzzzerd@programming.dev
      link
      fedilink
      English
      arrow-up
      4
      ·
      4 hours 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.

    • Croquette@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      26
      arrow-down
      1
      ·
      8 hours ago

      It’s because there is no such thing as optimisation anymore. Websites are bloated to the gills with terrible animations and tracking scripts.

    • Taleya@aussie.zone
      link
      fedilink
      English
      arrow-up
      14
      arrow-down
      7
      ·
      6 hours ago

      Programs. They are called programs . We are talking about desktop machines, not mobile devices

    • A_norny_mousse@feddit.org
      link
      fedilink
      English
      arrow-up
      27
      ·
      edit-2
      10 hours ago

      It’s because people want cross-platform apps and web is the easiest way to do it.

      Just use the website then? There already is a suitable browser installed on every system. But no, must have apps. Makes it easier to stop people from having opinions about data collection and such. And the full browser stack needs to be fully reproduced each time. It gets really ridiculous when these apps sit idly in the notification area. Not to speak of security implications because electron apps and such usually don’t get timely updates.

      • ExLisper@lemmy.curiana.net
        link
        fedilink
        English
        arrow-up
        8
        arrow-down
        3
        ·
        9 hours ago

        Just use the website then?

        It is a good solution for some apps but if you need to store data locally, use push notifications, run something in the background or access any native APIs you have to go with a native app.

        • A_norny_mousse@feddit.org
          link
          fedilink
          English
          arrow-up
          23
          arrow-down
          1
          ·
          9 hours ago

          All major browsers can do this - with the exception of running something in the background I guess. But that is exactly the sort of usage scenario where an Electron app is the worst choice. Coding a separate utility with no GUI would be the sane thing to do here, not put whole browser stacks into memory.

          • ExLisper@lemmy.curiana.net
            link
            fedilink
            English
            arrow-up
            7
            arrow-down
            2
            ·
            9 hours ago

            You’re actually right, by now browsers have APIs to do most of the things apps do. Technically you could convert most apps to websites. I guess as a user I just don’t want all my apps to open a tab in my browser. I want to move apps between virtual desktops and monitors independently and I don’t want my app’s window to be clattered by all the menus from my browser. On mobile I also prefer switching between apps than between different tabs. For me the best compromise is:

            • for system tools that don’t have to be cross platform and critical apps write native apps
            • for small/medium cross platform apps use webviews like Webview2 or Tauri
            • for big apps like Teams or Discord just use a website
            • A_norny_mousse@feddit.org
              link
              fedilink
              English
              arrow-up
              4
              ·
              9 hours ago

              I guess as a user I just don’t want all my apps to open a tab in my browser. I want to move apps between virtual desktops and monitors independently and I don’t want my app’s window to be clattered by all the menus from my browser.

              All this is already possible with most browsers.

  • GnuLinuxDude@lemmy.ml
    link
    fedilink
    English
    arrow-up
    48
    arrow-down
    3
    ·
    11 hours ago

    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.

    • CeeBee_Eh@lemmy.world
      link
      fedilink
      English
      arrow-up
      10
      ·
      6 hours ago

      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

  • _cryptagion [he/him]@anarchist.nexus
    link
    fedilink
    English
    arrow-up
    109
    arrow-down
    1
    ·
    15 hours ago

    I really wish Electron wasn’t as popular as it is. It’s such a fucking memory hog. I mean, sure, I’ve got RAM to spare, but I shouldn’t need that much for a single app.

    • cmnybo@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      47
      ·
      14 hours ago

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

      • lastweakness@lemmy.world
        link
        fedilink
        English
        arrow-up
        40
        ·
        14 hours 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.

        • Pechente@feddit.org
          link
          fedilink
          English
          arrow-up
          29
          ·
          edit-2
          13 hours ago

          Yeah but companies want full control and no ad blockers. That’s why they’re pushing shoddy Electron apps over their web experiences and PWAs.

      • tal@lemmy.today
        link
        fedilink
        English
        arrow-up
        8
        ·
        edit-2
        11 hours ago

        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.

      • plz1@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        ·
        13 hours 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.

    • modular950@lemmy.zip
      link
      fedilink
      English
      arrow-up
      9
      ·
      14 hours ago

      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 …

      • TheBlackLounge@lemmy.zip
        link
        fedilink
        English
        arrow-up
        8
        ·
        edit-2
        10 hours 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.

  • Kynn@jlai.lu
    link
    fedilink
    English
    arrow-up
    28
    arrow-down
    1
    ·
    12 hours ago

    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.

      • Kynn@jlai.lu
        link
        fedilink
        English
        arrow-up
        14
        ·
        11 hours ago

        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.

        • dogs0n@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          1
          ·
          56 minutes ago

          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?

          • Kynn@jlai.lu
            link
            fedilink
            English
            arrow-up
            1
            ·
            7 minutes ago

            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.

  • floofloof@lemmy.ca
    link
    fedilink
    English
    arrow-up
    134
    ·
    edit-2
    16 hours ago

    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.

    • XLE@piefed.social
      link
      fedilink
      English
      arrow-up
      6
      ·
      5 hours ago

      “It sounds like you want low-end devices to be turned into thin clients for cloud-based operating systems. Do I have that right?”

    • tekato@lemmy.world
      link
      fedilink
      English
      arrow-up
      9
      arrow-down
      1
      ·
      10 hours ago

      Why would you do that when you can pull 50 JavaScript libraries and wrap it in Electron?

    • Ugurcan@lemmy.world
      link
      fedilink
      English
      arrow-up
      32
      arrow-down
      6
      ·
      edit-2
      13 hours ago

      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.

        • fernandofig@reddthat.com
          link
          fedilink
          English
          arrow-up
          11
          arrow-down
          1
          ·
          7 hours ago

          Maybe not Javascript as a language, but the framework it requires to get applications written with it running, which is a lot. And in a roundabout way, it kinda has a little to do with the language itself, as the reason electron got so popular in the first place is because it catered to web developers who either couldn’t be bothered or couldn’t figure out proper desktop app devlopment, so they went with the easy short-term path. And Javascript kinda is an easy language to pick up and write simple.projects in - now, maintaining more complex applications with it is another story.,.

          • Nenutzerbame@feddit.org
            link
            fedilink
            English
            arrow-up
            3
            ·
            6 hours ago

            It has less to do with JavaScript as most people tend to think IMO. JavaScript does not require Electron to exist, it’s rather the other way around. The fact that Electron ships a whole browser is the culprit and you could even argue that V8 is bloated as well, though I’m not sure how efficient it is built and how much size it takes. Browsers historically need to support so much legacy stuff which is another main factor for its size. I really hope for stuff like Tauri or Servo to gain traction.

            • [object Object]@lemmy.world
              link
              fedilink
              English
              arrow-up
              1
              ·
              2 minutes ago

              you could even argue that V8 is bloated as well

              Not really, no. It’s very compact compared to Python, Java or most anything comparable. A compiled program would be smaller, of course, and Lua is minuscule next to anything — but otherwise V8 is small and fast. Iirc Node.js takes something like 30 MB out of the box, including its modules and libraries.

    • DominusOfMegadeus@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      65
      ·
      edit-2
      16 hours ago

      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

      • cenzorrll@piefed.ca
        link
        fedilink
        English
        arrow-up
        19
        ·
        15 hours ago

        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.

        • VieuxQueb@lemmy.ca
          link
          fedilink
          English
          arrow-up
          3
          ·
          6 hours ago

          It’s always been there, why is there so many great Open Source Software out there ? Even Linus started the linux kernel because he could not afford Unix.

    • neon_nova@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      21
      arrow-down
      3
      ·
      15 hours ago

      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.

      • mushroommunk@lemmy.today
        link
        fedilink
        English
        arrow-up
        9
        ·
        15 hours ago

        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

          • mushroommunk@lemmy.today
            link
            fedilink
            English
            arrow-up
            1
            ·
            5 hours ago

            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.

    • warm@kbin.earth
      link
      fedilink
      arrow-up
      4
      ·
      15 hours ago

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

      • floofloof@lemmy.ca
        link
        fedilink
        English
        arrow-up
        4
        ·
        11 hours ago

        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.

        • warm@kbin.earth
          link
          fedilink
          arrow-up
          1
          ·
          4 hours ago

          Hardware doesnt need to get more powerful either. If we actually harnessed it, we have what we need already.