• Aux@feddit.uk
    link
    fedilink
    English
    arrow-up
    1
    ·
    4 hours ago

    Most resources are not consumed by wonky code or dependencies. Most resources are consumed by images and sounds.

  • Gxost@lemmy.world
    link
    fedilink
    arrow-up
    15
    ·
    18 hours ago

    It’s all because of Electron, unnecessary libraries, and just bad coders. Asus Armoury Crate weighs a lot and is so slow, but it’s basically a simple app. Total Commander has much more features, but it’s fast, lightweight, and consumes 9 MB of RAM.

    • SirQuack@feddit.nl
      link
      fedilink
      arrow-up
      8
      ·
      13 hours ago

      I’ve said this on reddit before, but once for a joke I tried to make a windows program to play doot.wav during October at random, and tried programming it on Linux.

      Sinds playing audio and working with the system tray was tricky, I ended up with electron.

      So yeah, an atrocious 120 mb application to play a 6kb wav file with a Math.random(). I don’t remember the memory consumption, but it was probably just as gross.

      • Gxost@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        10 hours ago

        Once I wrote an annoying program adding acceleration to the mouse cursor, so it was difficult to click any UI item. It was written in Object Pascal with Win API and weighted 16 KB. And I think in C it would be even smaller.

  • AppleTea@lemmy.zip
    link
    fedilink
    arrow-up
    50
    ·
    edit-2
    22 hours ago

    isn’t it a combination of younger developers not learning to programme under the restrictions of limited memory and cpu speed, on top of employers demanding code as soon as possible rather than code that is elegant or resource efficient or even slightly planned out

    • herrvogel@lemmy.world
      link
      fedilink
      arrow-up
      11
      ·
      17 hours ago

      Mostly the latter. We don’t do any optimizations on our product whatsoever. Most important thing is to say yes to all the customers and add every single feature they want. Every sprint is spent adding and adding and adding to the code as much as we can and as quickly as we can. Not a single second is allotted to any discussion about performance or efficiency. Maybe when something breaks, but otherwise we keep piling on more crap at full speed non-stop. I have repeatedly been told “the fast way is the right way” followed by laughter. I was told to “merge this now” on multiple occasions even when I knew that the code was shit, and told the team as much. I am expected to write code now and think about it later.

      As you can expect, the codebase is a bloated nightmare. Slow as shit, bugs galore, ugly inconsistent UI, ENORMOUS memory use, waaaaaay too frequent DB access with a shit ton of duplicate requests that are each rather inefficient themselves. It is a rather complex piece of lab management software, but not so complex that it should be struggling to run on dedicated servers with 8 gigs of RAM. Yet it does.

    • Lifter@discuss.tchncs.de
      link
      fedilink
      arrow-up
      15
      ·
      21 hours ago

      Much the latter.

      Plus everything better work perfecly out of the box on any hardware, and there is a lot of different hardware. Compatibility layers are often built into the package.

      Java, for instance, recommenda that you package the whole (albeit slimmed down) JVM inside the package for the target platform, rather than relying on the java runtime installed already.

      The users arent expected to know any of that anymore.

      • PrettyFlyForAFatGuy@feddit.uk
        link
        fedilink
        arrow-up
        5
        ·
        19 hours ago

        yep, a lot of apps are just repackaged chrome running a web page.

        which begs the question to companies that require use of the app instead of just having a working website i can use on my copy of chrome/firefox that’s already on my phone…

        why do you need hardware access to my device?

        • drawerair@lemmy.world
          link
          fedilink
          arrow-up
          4
          ·
          edit-2
          16 hours ago

          1 reason is that they want as much data as possible. They sell the user data. Or they use the user data to improve their targeted advertising. They want more ad clicks.

          Re app versus site, many know how to block ads on browsers. With an app, the firm is hoping they can show you ads. Ads can be removed from certain apps but the layperson doesn’t know.

    • MonkderVierte@lemmy.ml
      link
      fedilink
      arrow-up
      6
      ·
      edit-2
      15 hours ago

      Generally maybe but for apps specifically, it’s the default choice of IDE, Android Studio, bundling tons of libraries for added functionality bound to Play Services.

      Which would probably be illegal in EU now, if any judge had the tech see-through for it.

  • kamen@lemmy.world
    link
    fedilink
    English
    arrow-up
    13
    ·
    19 hours ago

    I’d argue that deploying from one codebase to 3+ different platforms is new functionality, although not for the end user per se.

    I wish though that more of the web apps would come as no batteries included (by default or at least as a selectable option), i.e. use whatever webview is available on the system instead of shipping another one regardless of if you want it or not.

    • Harlehatschi@lemmy.ml
      link
      fedilink
      arrow-up
      6
      ·
      18 hours ago

      But if your tool chain is worth anything the size of each binary shouldn’t be bigger. To oversimplify things a bit: it’s just #ifdefs and a proper tool chain.

      In the web development world on the other hand everything was always awful. Every nodejs package has half the world as dependencies…

  • rational_lib@lemmy.world
    link
    fedilink
    arrow-up
    15
    ·
    22 hours ago

    Because the app stores keep adding new requirements that you have to add code to deal with and it gets worse every year and seemingly every day.

  • RaptorBenn@lemmy.zip
    link
    fedilink
    arrow-up
    6
    ·
    19 hours ago

    It’s nearly all just using a whole library instead of the specific single function thats actually required, because few people are actually writing any code these days.

  • Blackmist@feddit.uk
    link
    fedilink
    English
    arrow-up
    71
    ·
    1 day 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
      20
      ·
      edit-2
      1 day 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

    • devilish666@lemmy.world
      link
      fedilink
      arrow-up
      6
      ·
      1 day ago

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

      • dbx12@programming.dev
        link
        fedilink
        arrow-up
        5
        ·
        22 hours 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.

      • dpflug@kbin.earth
        link
        fedilink
        arrow-up
        11
        ·
        1 day 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.

        • uuldika@lemmy.ml
          link
          fedilink
          arrow-up
          3
          ·
          1 day ago

          Java (and Object Pascal, I’m assuming) have very old-looking UIs. Discord’s gonna have trouble attracting users if their client looks like a billing system from 2005. Also, what do you do about the web client? Implement the UI once in HTML/CSS/JS, and again in JForms?

          So if you’re picking one UI to make cross-platform, and you need a web client, do you pick JForms and make it work on the web? or React and make it work on desktop?

          • dpflug@kbin.earth
            link
            fedilink
            arrow-up
            5
            ·
            20 hours ago

            I think maybe you’re confused. Java drives a significant percentage of Android apps. It absolutely can do modern UI. I can almost guarantee you’ve interacted with a Java program this year that you never considered.

            Pascal is more niche, but it can do modern, too.

            Java was doing web clients before the web could and still can. I don’t know much about Delphi’s web stuff, but I know they’ve targeted it for years now.

            WASM and transpiling blur the lines, too. LVGL can provide beautiful interfaces on the web as well as platforms Electron could never target, and works with any language compatible with the C ABI.

            I’m not saying these strategies are without their own warts, but there are other ways to deliver good experiences across platforms with a ~single codebase in a smaller payload. But mostly nobody bothers because they just reach for Electron. It’s this era’s “nobody ever got fired for picking Intel”.

            We need more people working with and on alternatives, not just for efficiency but also for the health of the software ecosystem. Google’s browser hegemony is feasting. Complexity has become their moat, preventing a fork from being viable without significant resources. Mozilla is off in a corner consuming itself in desperation.

            A US-based company holds a monopoly over the free web and a hell of a lot of our non-web software. So maybe let’s look for ways to avoid feeding the beast, yes? And we can get more efficient software in the process.

          • Takumidesh@lemmy.world
            link
            fedilink
            arrow-up
            2
            ·
            edit-2
            22 hours ago

            Yea, electron has flaws, but it’s basically the only way to make a truly cross platform native and web app. I would rather take a larger installed size and actually have apps that are available everywhere.

            The sad truth is there aren’t enough developers to go around to make sleek native apps for every platform, so something that significantly frees dev time is a great real world solution for that.

  • Stovetop@lemmy.world
    link
    fedilink
    arrow-up
    289
    ·
    1 day ago

    It’s just that we have to make space for our 5,358 partners and the telemetry data they need.

    • jmcs@discuss.tchncs.de
      link
      fedilink
      arrow-up
      141
      ·
      1 day ago

      And analytics. And offloading as much computation to the client, because servers are expensive and inefficiency is not an issue if your users are the ones paying for it.

      • kbotc@lemmy.world
        link
        fedilink
        English
        arrow-up
        16
        ·
        1 day ago

        I saw an ad request with an inline 1.4 MB game. Like, you could fit Mario in there.

        • state_electrician@discuss.tchncs.de
          link
          fedilink
          arrow-up
          5
          ·
          18 hours ago

          The Samsung shop hands out 1.4mb JSON responses for order tracking, with what I estimate 99% redundant information that is repeated many times in different parts of the structure.

    • lobut@lemmy.ca
      link
      fedilink
      arrow-up
      32
      ·
      edit-2
      1 day ago

      Web “Apps” are also quite bad. Lots of and lots of stuff we’re downloading and it feels clunky.

      Sometimes that’s bad coding, poor optimization, third party libraries, or sometimes just including trackers/ads on the page.

  • KillingTimeItself@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    36
    ·
    1 day ago

    uh, please do ask, why does opening a fucking glorified text and image processing app require 1 gigabyte of ram.

    Who wrote this software? The guy from the bible who was the model for greed and gluttony? Jesus christ.

  • count_dongulus@lemmy.world
    link
    fedilink
    arrow-up
    125
    ·
    edit-2
    1 day ago

    Cheaper & faster development by leveraging large libraries/frameworks, but inability to automatically drop most unused parts of those libraries/frameworks. You could in theory shrink Electron way down by yoinking out tons of browser features you’re not using, but there’s not much incentive to do it and it’d potentially require a lot of engineering work.

    • zenpocalypse@lemm.ee
      link
      fedilink
      English
      arrow-up
      46
      ·
      1 day ago

      Yeah, though the joke is funny, this is the real answer.

      Storage is cheap compared to creating custom libraries.

      • Tanoh@lemmy.world
        link
        fedilink
        arrow-up
        7
        ·
        1 day ago

        Also the storage is the cost for the user, and google in the case of play store. So the developers have no incentive to reduce the size.

      • UnityDevice@lemmy.zip
        link
        fedilink
        English
        arrow-up
        1
        ·
        19 hours ago

        Storage is cheap on a PC, it’s not cheap on mobile where it’s fixed and used as a model differentiator. They overcharge you so much. Oh, and they removed SD card slots from nearly all phones.

    • Bytemeister@lemmy.world
      link
      fedilink
      English
      arrow-up
      17
      ·
      1 day ago

      Yep. Apps are 20x bigger with no new features…that you are using.

      Let’s not forget that the graphics for applications has scaled with display resolution, and people generally demand a smooth modern look for their apps.

  • enemenemu@lemm.ee
    link
    fedilink
    arrow-up
    141
    ·
    2 days ago

    Paypal has 500 mb and just shows a number and you can press a button to send a number to their server.

    It’s insane

    • Onomatopoeia@lemmy.cafe
      link
      fedilink
      English
      arrow-up
      13
      ·
      1 day ago

      Check out the apps Hermit and Native Alpha. They make web pages run like an app. I’ve only run into a couple sites where they don’t work right.

      • enemenemu@lemm.ee
        link
        fedilink
        arrow-up
        5
        ·
        1 day ago

        Native alpha sounds good since it’s foss and uses vanadium’s webview. Are you still logged in to paypal (any annoying website) a couple of months later. Or does it revoke your rights after a while?

        I only use it rarely and I hate providing my info for 5 minutes just to do one transaction.

  • devilish666@lemmy.world
    link
    fedilink
    arrow-up
    18
    ·
    1 day ago

    That topics always made me curious tho…take a sample AAA games back then has smaller size compared to shitty Unity 2D games nowadays and i wonder why ?

    • gens@programming.dev
      link
      fedilink
      arrow-up
      13
      ·
      1 day ago

      Less triangles and smaller textures. Crt monitors had less resolution and practically built-in anti-aliasing so they could get away with (and had to) “worse” assets.

      Also since ssd-s have become mainstream unity uses less compression so it would load relatively faster.

      Basically because monitors got better, standards got higher, competition got fiercer, storage got bigger and faster, etc.

      And it’s not like there weren’t shitty games before, just everybody forgot about them.

      I like how the game Banished is made. From a requirenments/looks ratio it is IMO great. One guy made it. Ghosts of Tsushima also looks amazing and is great from a techical perspective, but it is heavy.

      • endeavor@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        2
        ·
        23 hours ago

        Polygons aren’t that costly, they’re just a set of coordinates and pack up well and ultra expensive highpoly stuff is avoided wherever possible by proffessionals. It’s mostly textures and maybe audio that bloats size.

        • gens@programming.dev
          link
          fedilink
          arrow-up
          1
          ·
          10 hours ago

          Yea, textures are the biggest thing (unless there’s video). But don’t underestimate vertices, even when using strips. Unity, i think, just ships textures as BCn, meaning 1MB per 1k texture (would be 3-4MB raw). It’s even better for the gpu then raw. Then there’s normal maps, etc.

          Another thing is lighting data, be it some textures, probes, or whatever. That can also take up plenty of space.

    • endeavor@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      7
      ·
      edit-2
      23 hours ago

      Smaller textures, more assets, and worse audio mainly. Textures used to be like 512 for hero props. Now even random objects you see a few times get a texture 16 times larger. And they get up to 4 of those for each object/group of objects. Thanks to pbr and normals and whatever other masks and lightmaps may be required.

      Im sure there are more reasons for size bloat but this is from us artists at least.

    • Cratermaker@discuss.tchncs.de
      link
      fedilink
      arrow-up
      2
      ·
      1 day ago

      Yeah but like, what new features do apps have which weren’t available in those times? Embedded videos maybe? Doesn’t justify the bloat.