| ▲ | firefoxd 2 hours ago |
| This took me down a rabbit whole. Why can a simple single purpose app not be just a couple megabytes if not less? The popular options are electron 100MB+, or embedding python3 in your executable which is at least 40MB. But if you build it natively, you should have all of Microsoft tools at your disposition, dlls and such. In theory, this should allow you to make a 1 mb app or less. But in practice, it's the worse option. |
|
| ▲ | mort96 2 hours ago | parent | next [-] |
| Pictures and frame buffers. If you're running fullscreen at 4k, you're probably gonna take two roughly 3840x2160x3 byte frame buffers for the window. Your designers want a background image which moves as you scroll in some parallax style; that's over 3840x2160x3 bytes more for the pixel buffer backing the image layer. And let's say roughly 50% of your screen is text with subpixel (aka full color) anti aliasing; that means another 3840x2160x3x0.5 bytes for the pre rendered text. 3840x2160x3x3.5. That's 87MB, in pixel data only. And it's a very minimal example; for the parallax image, you're gonna want the image to be significantly taller than the window; you're gonna want a ton of smaller (tho still high DPI) images for icons; a few different font atlases for different font faces you've loaded at once; maybe pre rendered pixel buffers for all sorts of UI components; etc. And lord help you if your designers want any part of this to be animated. (I'm playing a bit fast and loose with what lives on the GPU and what lives on the CPU here. On many systems, they share a memory pool anyway. But on systems with discrete GPUs, most of this is gonna be video memory. Though applications may wanna store CPU-side copies as well for various reasons.) |
| |
| ▲ | firefoxd an hour ago | parent | next [-] | | Good point. Though 4k image assets mean more that they look in 4k, not that their size is 4k. It might not be 87mb, but still way more than the couple mb I suggested. | |
| ▲ | 201984 an hour ago | parent | prev [-] | | >Your designers want Sometimes, you need to tell the designers NO. Moving background images don't help people figure out what the weather is going to be. | | |
| ▲ | keicwifjwud 43 minutes ago | parent | next [-] | | And sometimes your engineers need to be a LOT less stingy. 1GB is clearly overkill for an app such as this, but ~300MB is perfectly acceptable if it works well, looks good and does what it should do. There is such a thing as overdesign, but when you’re building a modern application, you must trust your designer’s sense of aesthetics and knowledge of UX patterns—two things engineers are often notoriously bad at. | |
| ▲ | mort96 an hour ago | parent | prev [-] | | Honestly if the image is of the current weather it kinda does. I don't mind e.g Apple's weather app design at all |
|
|
|
| ▲ | ashleyn 10 minutes ago | parent | prev | next [-] |
| A lot of these applications run in Electron or similar libraries where a whole new browser instance, with all its overhead, is stood up for each application. The simplest answer is we need to stop trying to use web technologies as a one-size-fits-all GUI toolkit. |
|
| ▲ | trzy 2 hours ago | parent | prev | next [-] |
| The visual assets alone will be tens of megabytes. |
| |
| ▲ | anonymars 2 hours ago | parent | next [-] | | Why, though? You need some icons and some map imagery, not 4K texture maps | | | |
| ▲ | iAMkenough 2 hours ago | parent | prev | next [-] | | For a weather app, you should be able to get by with a couple base vectors you modify based on conditions. | | |
| ▲ | mort96 2 hours ago | parent [-] | | On disk yeah, sure. But you're gonna render them into a pixel buffer which lives in memory. | | |
| ▲ | samrus 2 hours ago | parent [-] | | How did applications do it before? Like in the 90s or 00s | | |
| ▲ | mort96 2 hours ago | parent | next [-] | | WAY lower resolution screens so pixel and frame buffers were a tiny fraction of the size, non-composited graphical environments which meant there was one fewer frame buffer per window, and a visual style which typically emphasized large pictures/animations less. | |
| ▲ | nicoburns 2 hours ago | parent | prev [-] | | They had fewer graphics, and much lower resolution screens. | | |
| ▲ | Dylan16807 an hour ago | parent [-] | | Windows 98 SE kind of went overboard with the graphics (remember Active Desktop?), and a common screen size at the time was 1280x1024. But if you run modern stuff at 1080p (60% more pixels) or 720p (fewer pixels), you're not going to see comparable memory use. | | |
| ▲ | mort96 an hour ago | parent | next [-] | | Windows 98 wasn't composited, which makes a huge difference. And to be clear, there's a ton of unnecessary bloat today as well. It's just that even a lean and mean highly hand optimized native app is gonna be way bigger today than it was then, due to compositing, higher resolution assets, higher resolution screens and different design sensibilities. But most apps aren't lean and mean highly hand optimized native apps so. | | |
| ▲ | Dylan16807 38 minutes ago | parent [-] | | Compositing means you can excuse an extra dozen megabytes per megapixel of window size. The window in the article is less than a megapixel. That factors in the relevant part of screen resolution too. High resolution assets should scale alongside window size too, adding a fraction of the above dozen megabytes. And I'm saying 98SE already had image-heavy design sensibilities all over. You don't have to highly hand optimize to run a weather UI in a lean way. |
| |
| ▲ | vel0city an hour ago | parent | prev [-] | | > and a common screen size at the time was 1280x1024 Maybe if you were really rich and only used high end desktops. A lot of the computers I used back then were still 800x600, fancier ones were 1024x768. If you happened to also have a 2D accelerator card you'd potentially have 1280x1024. And lots of apps purposefully ran at a much lower color depth, it was common for games to run at 8 or 16 bit color mode. | | |
| ▲ | Dylan16807 an hour ago | parent [-] | | I saw a lot of computers set to 800x600 but I don't recall any that couldn't be switched to at least 1024x768. Which is still quite close to 720p for making this comparison. And yeah lots of fullscreen-ish things ran in lower color, but this is about desktop mode and I never saw a desktop mode that struggled based on color depth. |
|
|
|
|
|
| |
| ▲ | Micrococonut 2 hours ago | parent | prev | next [-] | | Should be able to get by with using system graphics | |
| ▲ | SV_BubbleTime 2 hours ago | parent | prev [-] | | Do all visual aspects of a weather app need to be loaded at once? Is the cost penalty loading a hundred kilobytes per image from disk really unacceptable? | | |
| ▲ | doikor 2 hours ago | parent | next [-] | | Even if the app is no longer using that memory it is not released until Windows thinks another app needs it. | |
| ▲ | vel0city an hour ago | parent | prev [-] | | And then people complain about how unresponsive applications are, all these little stutters as things pop in. |
|
|
|
| ▲ | znpy 2 hours ago | parent | prev [-] |
| It can, but you have to know what you’re doing and you have to know it very well. Looking at the opposite extreme, the guy that originally wrote the windows task manager (the thing that popped put when you pressed ctrl+alt+canc) posted a video about cloning the windows basic text editor in a 3kb binary: https://youtu.be/OG91c7xsNMc Needless to say, the guy knows what he’s doing. |