Live data from Hacker News

Don't animate height

granola.ai

21–30 of 276 posts

Re: Don't animate height

#21
My head is sort of reeling from this. If height animations are that expensive today, imagine how expensive (and still commonplace) they were twenty years ago.

I fortunately quit animating height quite a long time ago in favor of similar transform techniques, but… wow, still crazy to learn the magnitude of this common operation.

Re: Don't animate height

#22
This helped explain why my PC uses so many resources "with just a few webpages open". I didn't realise that graphical updates that seem so simple could be so resource-intensive.

Re: Don't animate height

#23
Is it just me, or have a lot of modern startups lost the plot? Imagine doing all this work for an element of your app which has nothing to do with its feature set. No one cares (certainly no customer) about an audio visualizer bar animation.

The post is also riddled with all kinds of misunderstandings, as well. For example, the authoritative language used to describe the differences between layout/painting/compositing is just simply untrue generally speaking (though it might be w.r.t. Electron/Chromium). The W3C does not care how you implement your rendering engine, and even bringing up the spec betrays a misunderstanding of how these things work.

In typical fashion, we see yet another grandiose blog post about fixing a "perf issue" for your hipster new startup that is essentially notepad.exe. Who funds this shit?

Re: Don't animate height

#24
post #10

Great writeup. With LLMs doing an increasing amount of the coding now, it would be great for the browser or development environment to have built-in validations that enforce good performance. The coding agent (or human) would get direct, immediate feedback at development time that there's a performance threshold violation, at development time.

We're working on this within Chrome DevTools, similar to an MCP server with the signals you're describing.

Re: Don't animate height

#25

"What is Granola spending those cycles on? It's an Electron app" Yup. Matches my experience with pretty much every Electron app. Great that the dev tracked it down, but every Electron app is a waste of...electrons

Might be worth getting off of that high horse. You are not being very smart by saying 'akctually electron bad'.

You know what else was a waste of electrons? Your comment, and my reply.

Re: Don't animate height

#26
post #11

So, after all the optimization, they're using 6% of the CPU to display what amounts to a tiny animated GIF that 1990s PCs would have no problem with. But it's vector graphics! , you might say. Yeah, like Flash, which ran fine on Pentium II, with plenty CPU cycles to spare. Pardon me, and I don't say it lightly, but... WTF?!

Yeah author congratulating themselves at the end because their note app is only using hundreds of millions of cycles every seconds, to do essentially nothing...

Re: Don't animate height

#27
post #11

So, after all the optimization, they're using 6% of the CPU to display what amounts to a tiny animated GIF that 1990s PCs would have no problem with. But it's vector graphics! , you might say. Yeah, like Flash, which ran fine on Pentium II, with plenty CPU cycles to spare. Pardon me, and I don't say it lightly, but... WTF?!

I do miss flash, but we shall not forget that the performance boost came from low level access to the system (which made it a security risk).

Re: Don't animate height

#28
post #25

"What is Granola spending those cycles on? It's an Electron app" Yup. Matches my experience with pretty much every Electron app. Great that the dev tracked it down, but every Electron app is a waste of...electrons

Might be worth getting off of that high horse. You are not being very smart by saying 'akctually electron bad'. You know what else was a waste of electrons? Your comment, and my reply.

Your reply was not necessary though. Every electron app uses more of my computer's resources than when I use the same service through the web browser.

Re: Don't animate height

#29

Wondering what the performance of a simple animated gif would be, instead of the composite layer transformations.

If the bars are not related to actual data and are purely just pre-canned animation, the gif would just come with additional file size for a one time cached type of download. If the bars do need to be animated to real-time data coming in, then the gif would not be the right fit for that need.

Can't imagine anyone is deriving much information value from a visualizer with 3 bars. Apple Music has a similar animation and it will start bouncing when you click play, while the music is clearly downloading and there's no sound.

Re: Don't animate height

#30
post #25

Earlier quoted context omitted.

Might be worth getting off of that high horse. You are not being very smart by saying 'akctually electron bad'. You know what else was a waste of electrons? Your comment, and my reply.

Your reply was not necessary though. Every electron app uses more of my computer's resources than when I use the same service through the web browser.

Do you have that documented somewhere, or is it just your observation?
Post reply on HN