Live data from Hacker News

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

twitter.com

161–170 of 342 posts

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

#161
post #116

Earlier quoted context omitted.

Thanks for the link. The issue seems to be the IOAccelerator framework: > I’ve narrowed it down quite a bit (and submitted it to Apple as FB9112835). > What’s going on is that the IOAccelerator framework has some sort of massive leak in it, where it’s using up 35GB of ram, 25 of which is going to swap (which is why you’re seeing kernel_task flake out). > On intel, the same image only uses 1480K from IOAccelerator.

Wow. This can explain some of excesive swap usage on M1.

Seems like a poor conclusion to draw with this little information.

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

#162

AFAIK GIFs for actual video content (rather than small animated (emot)icons) went obsolete in about 1995, when the first RealPlayer video plugin was released. Can someone explain to me why people are still using them for that 26 years later, especially now that we have much better formats like webm, mp4, or SVG, and will hopefully have AV1 hardware-supported in a few years ?

It's the only form of video which 1) browsers universally treat as an image file and which automatically, reliably and seamlessly loops and 2) also has wide support outside browsers and user familiarity.

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

#163

Earlier quoted context omitted.

It should be equal when we are talking about webapps.

It would be fair for a browser to assume that if you’ve just visited one page that you might return soon, and so keep assets in cache for a little while.

Well yes, if done right some browsercaching is fine.

But that could pile up quickly, so I am not sure if and how it is done in the various browsers.

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

#164

Earlier quoted context omitted.

A YouTuber investigated (but no shell commands AFAIK, observing through Activity Monitor), but seems like Rosetta 2 apps might also contribute to the high disk usage. https://www.youtube.com/watch?v=FyMCoQmsv-I

Activity Monitor is not a reliable way to inspect memory usage, it's optimized for speed of calculation. Use 'footprint' and 'zprint' or Xcode/Instruments instead.

Activity Monitor measures memory footprint.

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

#165
post #147
post #143

Earlier quoted context omitted.

Hmmm... the chances for that are pretty slim I'm afraid. "Apple Silicon" is not a new system, it's just one of the large incumbents switching to another architecture (which is also not a first, this now being their fourth architecture, after 680x0, PowerPC and x86). In the desktop/notebook market, Wintel and Apple are firmly entrenched, with only ChromeOS and Linux challenging them - plus a few less significant OSes…

Apple’s arm has a partially different instruction set than other arm devices. So it’s not just arm, something to consider.

This is the first I have heard of Apple doing this, and I feel like, in my position, I would have heard of this... I have just spent some time searching around myself trying to find any such reference and the closest I could find was the opposite: an article from Electrical Engineering Journal that said that Apple could have, but stated they didn't need to and pretty strongly implied they didn't, even going so far as to claim that they couldn't in any drastic way due redirections "even Apple" has on ARM licensees.

https://www.eejournal.com/article/whats-inside-apple-silicon...

Can you provide some more information on this? I would love to be able to hit them on this, as this would actually be really upsetting to a lot of people I know who work on toolchains.

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

#166
post #60

Earlier quoted context omitted.

"Optimized" in this sense meant that animated gifs can have a frame reference only three pixels of the original image. So an image of 300K with only small movement (think cinemagraphs) wouldn't be much larger. This is a given for movie formats, but at the time the animated GIF came up it was revolutionary. I think the proper phrase should be "animated GIFs can be pretty optimized, taking into account how inefficient…

That's "compressed," not "optimized".

For an image codec I think of those as the same thing. What do you mean by optimized besides compression?

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

#167
post #147

Earlier quoted context omitted.

Apple’s arm has a partially different instruction set than other arm devices. So it’s not just arm, something to consider.

Every ARM licensee does this though; they license the core designs from ARM and add features (including additional instructions) around it to package into an SOC. It’s just that Apple has the scale to design their own SOCs instead of buying one from Qualcomm or Samsung.

Most licensees do not, in fact, add their own instructions.

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

#168

Earlier quoted context omitted.

It sometimes feel like it is a bonus today, if apps bother to clean up their memory at runtime, so maybe that's why parent poster thought it is a good and special thing, that the OS free's the memory of an ended processes. Btw. many people don't seem to know, that also in languages with a garbage collector like Javascript, you can create awesome memory leaks. And I would bet, most websites actually do: it only works,…

I have 32GB of RAM and it sits unused most of the time. Right now I am at 4GB/32GB. It simply isn't a significant source of memory consumption. Open Atom and you can easily get to 500MB for a single application, which is completely wasteful. That browser can run dozens of apps in 4GB.

I have 32GB of RAM and usually browsers use about 10GB of it. But I do open a stupid amount of tabs.

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

#169

Earlier quoted context omitted.

Like with the butterfly keyboard? The one which they called a "pig" internally where "lipstick won't fix it", but which they kept selling for years? That totally broke my trust that Apple will address quality issues. https://www.ped30.com/2021/03/23/apple-butterfly-lipstick-pi...

Yes, it sucked that it took so long to redesign it. The bad keyboards started appearing around 2016, and it wasn’t until 2019 that a redesign first appeared, on the new 16” MacBook Pro. But Apple have always been good about free, no-questions-asked, out of warranty replacements for faulty/sticky butterfly keyboards. Not really sure what more you could reasonably want them to do.

Because they extended the warranty replacement to four years for the keyboard? Once that's done and now they are going to push people towards buying entirely new models since an out of warranty keyboard repair on these things is something absurd like $600-700 IIRC.

Trust was eroded because every year they came out with some improvement on it that was supposed to fix the problem, then at the end of the year models with those keyboards were added to the expanded warranty program.

I think it would have been better if they had a real fix for this issue, it probably would have been expensive for them with a redesigned top and bottom case to fit a decent keyboard but right now the butterfly keyboards seem like ticking time bombs. Eventually they will die and Apple will either ask several hundred to repair it or say parts no longer exist and buy a new one.

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

#170
post #165
post #147

Earlier quoted context omitted.

Apple’s arm has a partially different instruction set than other arm devices. So it’s not just arm, something to consider.

This is the first I have heard of Apple doing this, and I feel like, in my position, I would have heard of this... I have just spent some time searching around myself trying to find any such reference and the closest I could find was the opposite: an article from Electrical Engineering Journal that said that Apple could have, but stated they didn't need to and pretty strongly implied they didn't, even going so far as…

https://blog.adafruit.com/2021/01/15/the-secret-apple-m1-amx...

The rumor I've heard is that Apple is keeping their custom extensions to the ISA undocumented in deference to ARM's desire not to have the instruction set just completely fragment into a bunch of mutually incompatible company-specific dialects.

It's worth noting that the article you link predates the public release of the M1 by a good 10 months. Given how secretive Apple tends to be about these sorts of things, one can only assume that it was based almost entirely on rumor and conjecture.

Post reply on HN