Live data from Hacker News

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

twitter.com

151–160 of 342 posts

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

#151

Earlier quoted context omitted.

I still don't see how this can be classed as a bug by anyone other than apple. You have a single case of 10% lifetime usage (plus a 20% one you mention), along with thousands of reports of people with 2-5% - which you also stated was too high - based on your insistence of using TBW (which can vary by up to 10000x depending on the tech) instead of percentage used (supplied by the manufacturer). I had an out of memory…

It is by design, but not that much . That's the point. The machines are designed to use swap and memory compression to greatly enhance responsiveness even with less physical RAM than competitors. And that works well for most users. But there's a bug in the heuristic, and for some users, it starts pathologically swapping. We've seen the numbers go up in the activity monitor. Even while doing ~nothing. Fast. That is ob…

> Terabytes per day of swap activity is not normal, no matter how much these machines are designed to swap on purpose.

1TB is only 62.5 * 16GB. If its paging out 8GB+ apps (quite easy for chrome with a number of tabs) it only takes one memory hog to increase the TBW in a few hours of typical app switching for a mobile app developer.

This edge case is pretty extreme, sure, but its still a MINIMUM lifetime of 2 years. It doesn't mean its suddenly going to die when it hits 100%, and even if it did it should be covered by warranty. And this usage is an order of magnitude more than the vast majority of other reports that were made.

Im inclined to think its a non-issue, but totally respect your position.

As an aside, I use tab suspenders on my browsers - habit from my intel mac where chrome frequently caused memory congestion. Its probably why I get away with running 2 iOS simulators, an android emulator, xcode, intellij, 3 vscode instances, safari, firefox and chrome, and a bunch of utilities and services on an 8GB machine - but ill still be first in line for a 32GB+ 16+ core machine, because then ill be able to run VMs :D

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

#152

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 ?

From personal experience, it's because not everywhere I want to share a video inline supports proper video files, but they more-often-than-not support gifs. Github was once such example; but now that they support rendering videos in PRs, I've stopped uploading gifs.

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

#153
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.

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.

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

#154

Earlier quoted context omitted.

Uh-oh, this is sooo important, some title on the Internet is wrong ! If I read it correctly, the same app, compiled from the same code, for the same OS, but different CPU architectures, exhibits wildly different memory consumption for the same task. That's what's interesting here, at least to me, but you chose to nitpick on the title instead, just because - from what you write - it offended you somehow by not includi…

I don't like clickbait :) Or let me put this in your language: Uh-oh, this is sooo important, someone used sarcasm and wrote a ton of words I value less than piss! I mean, sure, go on, have fun, but at least don't expect me to care about your opinion

Where did you get the idea that I expect you to care?! Honestly, I was hoping you wouldn't.

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

#155

Who else is excited that we are might revive the 80s Cambrian explosion of different system system and architectures? Back then there were so many options.

Back then code was usually closely tied to the hardware with very little abstraction. Nowadays even if you write in a low level language it's not difficult to target a wide array of devices if you go through standard interfaces.

Proprietary software is probably the main reason we haven't had a whole lot of diversity in ISAs over the past couple of decades (see: Itanium). It's no coincidence that ARM's mainstream explosion is tied to Linux (be it GNU/ or Android/).

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

#156

Who else is excited that we are might revive the 80s Cambrian explosion of different system system and architectures? Back then there were so many options.

Doubt.

CPU hasn't been the limiting hardware in a decade. I think Intel stagnated because people have prioritized spending money on GPUs, memory, and SSDs.

Even when I'm writing an intensive program, I'm using multiple cores, so a single threaded benefit is useless to me.

I have a half a mind to think the m1 is a marketing gimmick because making a better processor was low hanging fruit that CPU companies aren't trying to compete on(outside of price).

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

#157

Who else is excited that we are might revive the 80s Cambrian explosion of different system system and architectures? Back then there were so many options.

I would love to see a CPU Renaissance like this. Back then we had tons of variety, 680x0, x86, Rx000, various lisp machines, Vector computers, VLIW and Multiflow, Sparc, VAX, early ARM, message passing machines, 1-bit multiprocessors, Hypercubes, WD CPUs, and later an explosion of interesting RISC architectures... It was really interesting and enjoyable era.

we won't get a CPU Renaissance, but we are seeing a new era of "hybrid processors", aka dedicated processors running a custom ISA.

For example, Huawei's Kirin NPU.

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

#158

Earlier quoted context omitted.

> My point was nowhere nearly as interesting as if a specially crafted gif somehow triggered a memory leak in a driver when rendered. There's absolutely no mention of "specially crafted" GIF or "when rendered" in the title. You're projecting your expectations which have nothing to do with the story and are not even hinted at by the title, and choose to be offended that they get betrayed. There are many things I'd lik…

What's a GIF? An image format. What's done with image formats? They are viewed. The default thought if someone says they opened a gif isn't "they splayed open the hundreds of frames for individual manipulation" anymore than someone saying "Car moved from point A to point B" would mean "Car disassembled and moved piece by piece from point A to point B" And I don't recall the rule asking you to backseat mod :) Nothing…

> Please respond to the strongest plausible interpretation of what someone says, not a weaker one that's easier to criticize. Assume good faith.

> Please don't post shallow dismissals, especially of other people's work. A good critical comment teaches us something.

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

#159

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.

On the other hand, my browser (Firefox) keeps overflow through 8GB ram few times a day. Sometimes I wish people programmed like we had 512megs in a luxury machines.

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

#160
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".

GIF also uses a normal compression algorithm so saying “compressed” about frame deltas is unhelpful.
Post reply on HN