• Blackmist@feddit.uk
    link
    fedilink
    English
    arrow-up
    81
    ·
    4 days ago

    Fucking Chrome/Electron is why.

    I honestly wouldn’t mind that if they could all use the exact same runtime so the apps could be a few MB each, but nooooo.

    • nutt_goblin@lemmy.world
      link
      fedilink
      arrow-up
      23
      arrow-down
      1
      ·
      edit-2
      4 days ago

      See: Webview2

      Unfortunately, it is extremely painful to work with😔 Enjoy rolling your own script versioning and update systems instead of using squirrel et al

      Edit: I think Tauri works by targeting this and webkitgtk via their wrapper library, unfortunately I can’t get my coworkers to write rust

      • kungen@feddit.nu
        link
        fedilink
        arrow-up
        5
        ·
        4 days ago

        Isn’t that just the same pig, just wearing different makeup? I’m not a fan of msedgewebview2.exe allocating 500+ MB RAM just because Teams is open, but maybe that’s Teams fault…

        • nutt_goblin@lemmy.world
          link
          fedilink
          arrow-up
          4
          ·
          edit-2
          3 days ago

          Not quite. instead of a bundled pinned version of electron, it is an arbitrary version of edge’s WebKit fork shared across all programs using it. That means you don’t need to keep multiple copies of the webkit libraries loaded into memory.

          That’s not to say that building things on web technology is an efficient use of resources. Even if multiple programs are sharing the webview2 library, they’re still dealing with the fundamental performance and memory problems caused by building an app in JavaScript.

          As for why teams is so memory hungry? I would blame Teams.

          Discord manages to make a half decent, highly responsive webview app, and that’s with the overhead of having its own separate instance of electron.

          EDIT: the original poster was also talking about application binary size, not runtime memory consumption. Application binary size should actually be significantly helped by linking webview to instead of bundling electron.

    • devilish666@lemmy.world
      link
      fedilink
      arrow-up
      5
      arrow-down
      1
      ·
      4 days ago

      Is there any alternatives to electron ? And why people’s doesn’t move on to alternatives if electron is huge & heavy resources ?

      • dpflug@kbin.earth
        link
        fedilink
        arrow-up
        11
        ·
        4 days ago

        I mean, Object Pascal was doing the “write once, run anywhere” thing decades ago. Java, too. The former, especially, can make very small programs with big features.

      • dbx12@programming.dev
        link
        fedilink
        arrow-up
        6
        ·
        4 days ago

        The alternative is “just serve it as a regular website”. It doesn’t need to be an app to do its job. Name a functionality which only exists in electron but not in the standard browser API.