← Back to context

Comment by eviks

18 hours ago

> By comparison, Apple's native Weather app on macOS reportedly uses less than 250 MB of RAM

That's also bloated, couldn't they find a better comparison to illustrate the egregious waste?

It’s an equivalent app to make a comparison with, one from an OS company.

But yeah, I still remember when a weather app would take 10 MB and I was complaining (1999)

  • I prompted my own windows taskbar weather app in rust with radar and forecasts and it's 233 kB.

    https://github.com/derac/WeatherTray

    I use Linux now, so you're on your own if there are issues. It might require some windows library to be installed but I don't recall. I ran it for a long while on win11.

    • That's embarrassing.

      Not your app, it rocks.

      Microsoft. It's like some decision-maker thinks it's OK to waste memory as long as it's someone (everyone) elses' memory, but it really adds up if you know anything about scale.

      But what they're also doing is a non-businesslike under-utilization of their own resources.

      Which is disgraceful in itself on top of that.

      They're supposed to have much better AI than average and nobody even bothered to ask ChatGPT why in the world weather should take more than kilobytes?

      And if their AI can't do it autonomously in under a megabyte it should be able to give a plausible explanation why not by now, and at least it would be orders of magnitude better than a gigabyte.

      I assume yours went smoothly as prompted and it surely is an excellent example :)

      3 replies →

    • Not trying to excuse the Windows app's memory usage, but these are vastly different apps. Your app is nice, don't get me wrong, but it doesn't have anywhere near the same number of features as the default weather app. In some ways that's a pro for the Windows weather app (animated radar, easy to pan around in the radar view, extra map modes, lots of graphical elements to the presentation), in some ways yours is better (ad-free, for example).

      Don't get me wrong, I imagine one could get close to the same featureset while using <600+ MB of RAM, but an app that just shows a table of numbers and a static PNG for a radar isn't really the same.

      FWIW, while your compiled binary is 233kB, when its running its using 2.5-4.5MB.

  • 250 MB is exactly the sort of bloat you'd expect from this sort of daft web-browser-wrapper application, and Apple get it there. 1.2 GB, on the other hand, is 5x as much, and completely insane even when you start off with daft as your starting point.

    • Apple weather is fully native from what I understand. I suspect the 250MB comes from the video backgrounds they play. Arguably that would be a reasonable thing to sacrifice on low memory systems, you'd barely notice.

      5 replies →

  • 10MB to tell me the weather from a remote server...

    Let's remember that the sprawling world of Legend of Zelda SNES (a Link to the Past), including all graphics, music, code and dialogue was 1MB.

    • 1MB is about the lowest memory usage you can get on Windows 7, because of reasonable tradeoffs made in the operating system to things like buffer and stack sizes. The OS creates a few threads for you, those threads have stacks and they didn't optimize the allocation size of those stacks - they used a currently reasonable default.

      3 replies →

    • What else might that weather app be doing to justify the memory footprint? MS might suck at memory efficiency, but you can't claim they'd ever miss an opportunity to monetize their users. How can a weather app make MS money? MS has asked themselves this, so maybe we should too.

      3 replies →

  • 10 MB is ridiculously overbloated. 1 MB or something in that vicinity should be more like it.

    • I think you guys on HN can be a bit out of touch maybe? On my linux machine (measured with tux-manager):

        nautilus                            177 MB
        kitty                               150 MB
        alacritty                           107 MB
        mpv --idle --force-window           160 MB
        winit empty window + OpenGL context 100 MB
        tux-manager                         69  MB
        hexchat                             55  MB
        gnome-terminal                      47  MB
        st                                  12  MB
        xterm                               12  MB
      

      All these apps are what you would consider native, good apps. Written with Qt, GTK, some in low level langs like C\C++, Rust as well. There is of course different ways to measure the usage and maybe some more testing needs to be done, but stuff like 1-10 MB seems completely unrealistic. I think any empty Qt/GTK app eats 40 MB at least. Only thing that even gets close is st at 12 MB. And mind you it's a terminal (which is 1000x simpler than any modern GUI app, doesn't load any assets etc) and it doesn't even use any GPU accel (which itself seem to add a lot of baseline cost).

      Honestly I was a bit surprised myself. I have a Rust winit + ash vulkan hardcoded triangle demo app and it eats 86 MB (the binary itself is 5.5 MB). I would love to know, if anyone could explain why GPU accel seems to eat up so much RAM. Like yeah, there are a bunch of images that live on swapchain, but they should all be in VRAM. Outside of that I don't see what would require MBs worth of overhead.

      20 replies →

    • 10 MB is not too bad for a GUI app. If the app is full screen, display is FullHD and has 8 bit depth, that's almost 8 MB memory for the back buffer alone. Enable HDR and pixels become 8 bytes RGBA16_Float instead of 4 bytes BGRA8_Unorm, twice as much memory.

      17 replies →

    • How much money are these companies going to make by reducing their weather app to 1MB, or 10MB? How much is it going to cost them to get there?

      The world doesn't run on personal aesthetics, when nobody is willing to pay for them.

      11 replies →

    • `ansiweather` needs like ~6.28 MiB (measured with `/usr/bin/time -l` on OS X), but it's a bash script that invokes cURL, so there's certainly various overheads there too.

      One probably could get this down way below ~1 MiB with a properly tuned straight executable written in C (best not to use any of the "modern" stuff like Rust and Go, their default binary sizes for outputting "Hello, world!\n" are already extreme :-) )

      By default anything needs at least 532480 bytes RSS on OSX (I tested it with the most minimal C hello world), so that's a threshold one probably can't beat on OS X at least. We probably could kill that value on Amiga OS with the exact same functionality. :-)

      1 reply →

My entire kde "plasmashell" which includes my wallpaper and the various widgets installed (including a weather widget) uses 560MB for a screen with 5120x1440 pixels.

  • To add in the fun, “noctalia” process which is the shell, widgets (including weather :), wallpaper, app launcher, dock etc for my niri-wm setup is using 52MB.

Thank you. And it is a shame I had to scroll down this far in the comments for someone to point out the obvious. Even a weather app that uses "only" 250MB of RAM should never have been delivered by a semi professional software shop - 250MB is enough to store whatever they can display in full screen on a 5k display as a bitmap - 5 times.

  • It was the top comment for a few hours. Others have discussed why it makes sense for apple to ise 250 mb in a weather app (heavy graphics and animations). Someone did an audit on the app.

I built a weather app for myself fetching ECMWF ensemble forecasts for my home location. Running the service is 60mb plus data 39mb and another 2mb for the spaghetti charts showing temperature, clouds, precip, wind over 10 days. What do I need to do to fill the other 900mb?

  • Run those things as an electron app? Add on analytics, location tracking and data exfil and you'll be fairly close

The article now says for me "By comparison, Apple's native Weather app on macOS uses roughly five times less memory under similar conditions."... which is not exactly the same wording.

Edit: I see the "250MB" line later in the article. This article is itself bloated for repeating nearly the same thing again.

The most lightweight solution I can think of is:

   curl wttr.in

  • That's basically my weather app. Though, I made it fancy at 7 lines of bash which takes location arguments and pipes into jq for display.