5 ms·
Great news! A simple weather website, with about 1 MB worth of actual content (text, markup, images, layout) now only uses 250 MB of memory. And it only takes a
by barnacs 10y ago
Great news! A simple weather website, with about 1 MB worth of actual content (text, markup, images, layout) now only uses 250 MB of memory. And it only takes a few seconds to load on a 100Mbps+ connection whenever I click a menu item (that's with all ads and tracking blocked and most of the stuff already cached).
I'm sorry, I just don't see any reason to celebrate.
- kevindong 10y agoI personally just do a Google search for 'weather' if I want local weather. Otherwise, 'weather <location>'. Very fast and lightweight.
- deleted 10y ago[deleted]
- ksec 10y agoExactly this. Even though it is not quite 1MB, but more like 5-10MB including all the images. But requiring 250MB of memory, AND some doesn't even load 60fps smooth on latest machines. At times i wonder if there is something fundamentally wrong with the Web Stack.
- laichzeit0 10y agoConsole yourself by remembering that the vast majority of people creating these websites don't have computer science degreees. They learned their "trade" over a few weekends. Their "profession" is the equivalent of self-taught backyard abortionists.
- happycodework 10y agoFun fact, even though it's downloaded as compressed format, the windows drawing api bitblt requires bmp format, so it's probably saved in memory as bmp. A 1024x768x24bpp bmp is multiple megabytes, even though the jpeg is 100kb. (I think..)
- Arelius 10y agoBut Chrome doesn't use bitblt afaik. It's GPU composited, which does support a number of tile-level compression formats.
- ksec 10y agoYEs, but images 2,336 x 3,504 = 8,185,344 pixels @ 24bit color roughly equals to 24MB. That is lots of images even if you are on native resolution retina display. And doubling that gives you 48MB only. ( And someone has pointed out they are compressed differently within memory, so likely only consuming 1/2 to 1/3 memory size ) That leaves with 200MB memory gods knows what they are.
- brucedawson 10y agoNot just the Windows drawing API, but essentially any drawing API requires that images be decompressed. Some sprite sheets are particularly egregious. I've seen sprite sheets with dozens of 32x32 sprites stacked above each other, and a single wide (let's say 1024x32) sprite at the bottom. This can give you a sprite sheet which is 1024x2048, decompressing to 8 MB, with literally 97% of the data being blank pixels. Fixing this on the browser side is very hard - it's a content problem. The solution is to lay out sprite sheets to minimize blank space. Rearranging the sprites can easily get the number of blank pixels down to ~5-10%, thus saving ~7 MB, in essentially all browsers.
- vbezhenar 10y agoI think that web stack has its problems, but generally problem is developers (or their managers) who don't care about performance. It's possible to create awesome and performant websites with current web stack.
- johnfn 10y agoCome on man, you don't want to be that guy at HN that rains on everyone's parade. A 30% decrease in RAM usage for an app as complex as Chrome is really something to be celebrated. Great work is done piece by piece.
- JeremyBanks 10y agoHacker News wouldn't be Hacker News if it wasn't full of assholes.
- reitanqild 10y agoFeel free to tune your feelings. To qualify as one in my book you have to be a serious problem: one came to give me a beating at work and the only way I got away was to find a corner and a weapon until he got distracted. Another one made life at work so frustrating for two years that I left one of my best jobs ever just to never have to deal with that guy alone. Unless someone here is stalking you, messing up you life etc then try something like this instead: there are a lot of people on HN who disagrees with me in ways I didn't expect.
- colechristensen 10y agoHe has a point. For me, most of my 'web' experience isn't doing anything I don't remember doing in 1995. The things websites are doing I usually don't want them to do. I just want to see text, images, and video with light formatting and hyperlinks. This _doesn't_ require hundreds of megabytes of memory. It would involve restricting what the new web could do and those restrictions would make things better. We don't need the kitchen sink in every page.
- lrem 10y agoThat's about the reasoning behind amp...
- reitanqild 10y agoDidn't downvote you but I think you fell for the marketing.