Live data from Hacker News

Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likely due to memory leak

twitter.com

281–290 of 342 posts

Re: Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likely due to memory leak

#281

Earlier quoted context omitted.

I gather that it's true that ARM hasn't been as good about backwards compatibility as some of its competitors, but was ARMv8 really so much of a jump from ARMv7 that one can't count it as part of the same line of processors anymore?

Short answer is yes. Just one significant example all instructions 32 bit long and no Thumb. If you read Patterson and Hennessy (Arm edition) there is a slightly wistful throwaway comment I think that Aarch64 has more in common with their vision of MIPS than with the original Arm approach. Elsewhere you've commented that it's more similar to x86 -> x64 than x86 -> Itanium - which may be true but Itanium was a huge ch…

There's a sort of category problem underlying what you're saying though, perhaps fueled by the fact that ARM has more of a mix-and-match thing going on than Intel chips do.

aarch64 isn't really an equivalent category to x64, because it describes only one portion of the whole ARMv8 spec. ARMv8 still includes the 32-bit instructions and the Thumb. I realize you did mention Thumb, but you incorrectly indicated that it doesn't appear at all in ARMv8. As a counterexample, Apple's first 64-bit chip, the A7, supports all three instruction sets. This was how the iPhone 5S, which had an ARMv8 CPU, was able to natively run software that had been compiled for the ARMv7-based iPhone 5.

A better analogue to aarch64 would be just the long mode portion of x64. The tricky thing is that ARM chips are allowed to drop support for the 32-bit portions of ISA, as Apple did a few years later with A11. Like leeter said in the sibling post, though, x64 chip manufacturers don't necessarily have the option to drop support for legacy mode or real mode.

I think that's a fairly important distinction to make for the purposes of this discussion. I wasn't ever really talking about just aarch64; I was talking about all of ARM.

Re: Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likely due to memory leak

#282

Earlier quoted context omitted.

Not anymore? It's not like battery replacement is very viable on modern Macs, and the SSD wear issue means that most of these "daily driver" machines will end up dead in more like 3 or 4 years. But yes, older Macs were notorious for being great machines.

While I’d much prefer if the SSDs were replaceable, I don’t think there’s any evidence that Apple SSDs were failing or will fail in only 3-4 years.

Apple SSDs have historically had a lower TBW than the rest of the drives on the market, and combined with their swap abuse issue right now, I think it's fair for people to be alarmed.

Re: Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likely due to memory leak

#283
post #79

Earlier quoted context omitted.

For Apple Laptops, more like 7-8, at least in the old days. Typically you would only replace them when they (gradually) became annoyingly slow for daily use. Agreed, I had to upgrade all of of my PowerBooks/MacBooks at some point with RAM and larger HDDs/SSDs. And my last Apple Laptop is from 2012 and I learned that Apple now drops support by the OS considerably earlier than in the old days (i.e. unecesarily early, m…

Shouldn’t be unsafe. Security updates are still coming out for the older OS that runs on these machines.

That is not true AFAIK

Re: Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likely due to memory leak

#284
post #234
post #79

Earlier quoted context omitted.

For Apple Laptops, more like 7-8, at least in the old days. Typically you would only replace them when they (gradually) became annoyingly slow for daily use. Agreed, I had to upgrade all of of my PowerBooks/MacBooks at some point with RAM and larger HDDs/SSDs. And my last Apple Laptop is from 2012 and I learned that Apple now drops support by the OS considerably earlier than in the old days (i.e. unecesarily early, m…

AFAIK other than the 32 bit devices and some with smaller vram, all Intel Macs are still supported

This is not true at all.

Re: Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likely due to memory leak

#285

Earlier quoted context omitted.

Can you declare a video as looping, and have that correctly honored everywhere it plays? That has always Just Worked with GIFs, but the last time I checked (a couple of years ago) it basically never worked with any “proper” video format.

Most of gfycat's traffic these days is .mp4 files that pretend to be gifs. Even if you upload a gif, its converted into .mp4 because its a far more efficient transmission codec. I'm sure there's some javascript / backend logic that handles some corner cases. But... yeah. A lot of self-looping .mp4 stuff seems to be solved. The tag has been getting more and more consistent these days. I just do some hobby stuff though…

Twitter does the same, and I (along with other people) hate it. I mean... nice that it saves data, but I can't save it. To download an image is SO simple, but have to rely on 3rd party services to convert the video back to gif if I want to post it as gif on twitter later, or send as gif on whatsapp.

Re: Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likely due to memory leak

#286

Earlier quoted context omitted.

Most of gfycat's traffic these days is .mp4 files that pretend to be gifs. Even if you upload a gif, its converted into .mp4 because its a far more efficient transmission codec. I'm sure there's some javascript / backend logic that handles some corner cases. But... yeah. A lot of self-looping .mp4 stuff seems to be solved. The tag has been getting more and more consistent these days. I just do some hobby stuff though…

Twitter does the same, and I (along with other people) hate it. I mean... nice that it saves data, but I can't save it. To download an image is SO simple, but have to rely on 3rd party services to convert the video back to gif if I want to post it as gif on twitter later, or send as gif on whatsapp.

I know enough about the debugging terminals in Chrome and Firefox to just "save-as" the .mp4 file itself. So I personally haven't had any problems with saving or sharing .mp4s. (Most commonly: grabbing some animated .mp4 meme and copy/pasting it into Discord)

But yes: its weird that Chrome / Firefox don't have easy-to-use "save as" buttons on .mp4s. But just grab the .mp4 and share the .mp4 on whatever services you use.

Increasingly, it seems like .mp4 is becoming the new gif. Its not quite as user friendly yet, but there's all sorts of advantages compared to .gif.

Re: Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likely due to memory leak

#287

Earlier quoted context omitted.

Can I just upload a H.264 level 4.0 video anywhere where an image is allowed and it will be displayed as an image? Will it be displayed as an image in any forum, chat/messenger platform? Can I use it as my avatar in places that allows for gif avatars, like Mastodon? edit: grammar

Hmm, I'm thinking about the Web-browser level (Chrome / Edge / Firefox) instead of say, web-application layer (ie: PHPbb vs XenForo). The web browsers seems to have significantly improved compatibility of in recent years, and even had decent compatibility 10 years ago (if you use Baseline profile H.264 3.0 videos and Javascript to smooth over some edges).

I've seen this debate happening for so many years, and people will not stop using gifs until other solution works exactly as a gif for the end user. APNG or WEBP would be a better solution, as they are images in the end.

You say they had decent compatibility 10 years ago, but no. At least a couple years ago you still needed many fallbacks and it was a hassle to guarantee the video would show properly. Not to say that you wouldn't be able to share it as image to tumblr/pinterest for example.

Re: Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likely due to memory leak

#289

My first thought was that each "frame" of the GIF is being expanded/rendered to its own backingstore. GIFs are pretty optimized files — where each "frame" can be a diff from the previous. "De-diffing", converting palette-based pixels to full 24 or 32-bit RGB could really blow up fast.

That's exactly what happened to Firefox WebRender a year ago. I even managed to pick out the raw image frames in a memory dump of the process: https://bugzilla.mozilla.org/show_bug.cgi?id=1627739

Re: Animated GIF uses over 35GB RAM in Acorn on M1 Mac, likely due to memory leak

#290
post #277

Earlier quoted context omitted.

> We should drop gif support. We just need an actual replacement that has the same behaviours and actually works everywhere, as gif does. Videos are not a replacement, and other image formats don't work everywhere

Animated PNG is supported in every single modern browser, and degrades gracefully (the first frame is at least rendered.) https://www.caniuse.com/apng WebP support (including animation) was added to the most recent major version of Safari, meaning WebP has similarly widespread support. https://www.caniuse.com/webp

That is a way better solution, although APNG didn't help much for my test in terms of data, a 1.8mb gif was converted to a 1.5mb apng, not even worth my time to google gif to apng converter.

Webp worked well though, resulting in a 300kb webp. Might try to start using it

edit: nevermind, webp doesn't work on whatsapp.

Post reply on HN