Live data from Hacker News

Lottie 4.0 for iOS: new render engine with significant performance improvements

medium.com

101–110 of 127 posts

Re: Lottie 4.0 for iOS: new render engine with significant performance improvements

#101
post #98
post #90

I’m fascinated by AirBnB. So much modern tech business orthodoxy is around leveraging your core value proposition and outsourcing everything else. Yet here is AirBnB with their own iOS rendering framework. Is it part of their core value prop? Or do they ignore the advice? Or is their success causing them to waste cash on boondoggles like this? Or do these boondoggles help them attract engineering talent for less than…

Maintainer of Lottie for Android here. The vast majority of work on Lottie has been a passion project on nights and weekends. This particular contribution is actually the rare exception.

Oh that’s great to hear. So this is open source where you don’t need to work for the owner to get an MR accepted?

Re: Lottie 4.0 for iOS: new render engine with significant performance improvements

#102
post #90

I’m fascinated by AirBnB. So much modern tech business orthodoxy is around leveraging your core value proposition and outsourcing everything else. Yet here is AirBnB with their own iOS rendering framework. Is it part of their core value prop? Or do they ignore the advice? Or is their success causing them to waste cash on boondoggles like this? Or do these boondoggles help them attract engineering talent for less than…

The app is their business, erm, core value proposition. They earn their money by claiming to be better at getting a property owner money than anybody else, and getting a tourist a better accommodation. To avoid the latter choosing a hotel (God forbid!), they need all the flashy, infinite-scrolling goodness a native app can offer to get the buyer to stay on their app as long as possible. That app is their life line.

Re: Lottie 4.0 for iOS: new render engine with significant performance improvements

#103
post #98
post #90

I’m fascinated by AirBnB. So much modern tech business orthodoxy is around leveraging your core value proposition and outsourcing everything else. Yet here is AirBnB with their own iOS rendering framework. Is it part of their core value prop? Or do they ignore the advice? Or is their success causing them to waste cash on boondoggles like this? Or do these boondoggles help them attract engineering talent for less than…

Maintainer of Lottie for Android here. The vast majority of work on Lottie has been a passion project on nights and weekends. This particular contribution is actually the rare exception.

> The vast majority of work on Lottie has been a passion project on nights and weekends.

That's sad. That's really, really sad. I get why you would like to work on such a project, but it's got considerable value for AirBnB. Your work doesn't go to the "community", it goes to a large, unscrupulous, unethical money factory.

Re: Lottie 4.0 for iOS: new render engine with significant performance improvements

#104
post #97

Well now I understand why airbnb fees are so ridiculous... Guess all that UI fanciness comes at a price.

Maintainer of Lottie for Android here. I left Airbnb 5 years ago and have maintained the library 100% on nights and weekends for the past 6 years. I know your comment was sarcasm but fyi ;)

Thank you for your service! Not sarcastically! (Would that be !/s?)

Re: Lottie 4.0 for iOS: new render engine with significant performance improvements

#105
post #98

Earlier quoted context omitted.

Maintainer of Lottie for Android here. The vast majority of work on Lottie has been a passion project on nights and weekends. This particular contribution is actually the rare exception.

Oh that’s great to hear. So this is open source where you don’t need to work for the owner to get an MR accepted?

I used to work for Airbnb. When I left, I lost a few things like admin settings on the repo but they let me maintain it. Not sure what would happen if they didn’t… Nobody there has the time or context to do anything more than a rubber stamp.

Re: Lottie 4.0 for iOS: new render engine with significant performance improvements

#106
post #27

Earlier quoted context omitted.

Really, why? I thought they were charming and well-executed.

things like this violate the design principles values by novice and power users. novice users that use something once a week or month may enjoy additional visual cues and animations to be friendly and welcoming. low information density to not overwhelm. power users that use something every day or many times a day prefer things that are static, fast, and higher information density. this is from designing the user inte…

On the other hand the springy scrolling and the animation when switching from profile to landscape are some of the key features in iOS.

Re: Lottie 4.0 for iOS: new render engine with significant performance improvements

#107
post #103
post #98

Earlier quoted context omitted.

Maintainer of Lottie for Android here. The vast majority of work on Lottie has been a passion project on nights and weekends. This particular contribution is actually the rare exception.

> The vast majority of work on Lottie has been a passion project on nights and weekends. That's sad. That's really, really sad. I get why you would like to work on such a project, but it's got considerable value for AirBnB. Your work doesn't go to the "community", it goes to a large, unscrupulous, unethical money factory.

1. It’s open sourced, so it goes to both. Either AirBnB sponsor the build and promote it, or the community builds it and AirBnB uses it. I’m not sure why the latter would be better than the former. It’s better for the world than companies keeping all their libraries closed source.

2. AirBnB’s backing probably gives it more reach because it’s more likely to be maintained.

3. It’s up to the OP where they spend their time. I’m guessing they’re compensated in multiple ways for their efforts.

I’m all for calling out negative behaviour by big tech when I see it, but kneejerk “big company bad” type reactions are counter-productive.

Re: Lottie 4.0 for iOS: new render engine with significant performance improvements

#108

Earlier quoted context omitted.

No. Animations are usually performed by the GPU under the control of a separate process. "This system framework renders animations out-of-process with GPU hardware acceleration. Animation playback is managed by a separate system process called the “render server”. " This was actually a really cool trick that was in-place from day 1 and the main reason iOS animations were smooth on fairly anaemic hardware. And smoothe…

On iOS, you schedule animations (and all UI updates, period) on the main thread. iOS is then free to make those happen in a non blocking way. iOS dev 101 is “don't do long synchronous work on the main thread because your app will lose the ability to update its UI for the duration”

It's common for all client apps to not block the main thread be it iOS, Android or Web

Re: Lottie 4.0 for iOS: new render engine with significant performance improvements

#109
There's a screenshot in the blog post that shows "0%" CPU usage. I doubt that Cal wanted to make it seem like animations were "free" but I do want to caution people that just because the GPU is now handling drawing doesn't mean the usual concerns with animations with regards to performance don't apply (I am not going to wade into the UI aspects of when to use animations). Animations are best used in moderation, for short interactions rather than running continuously all the time, even when drawn with graphics hardware. It's nice to push 60 (or 120) fps every once in a while but your app should really not be drawing at all most of the time. That's fewer frames to display in software, and on newer iPhones with ProMotion that's also going to mean fewer display refreshes. Your users, and their batteries, will thank you.

(But really, moving all these things to CoreAnimation is really nice, kudos to all involved!)

Re: Lottie 4.0 for iOS: new render engine with significant performance improvements

#110
post #70

Earlier quoted context omitted.

GPUs have no concept of animation. A frame rendered by a GPU has a fixed state, usually computed on the CPU. Until recently, this was usually done on the main thread, because graphics APIs had poor support for being used from multiple threads. I have no idea what AirBNB was doing to fail 60Hz on rather simple scenes with a single thread, but you can rest assured that it is possible without multiple threads or even pr…

The point is that iOS has always used a separate process for computing the GPU state. Android does this on the main thread, which is why Android feels like garbage. And I say this as a former Android developer. Animations on Android feel like peanut butter. They always will until they are moved off the main thread.

No, it has not. If you talked to the GPU through OpenGL, you did it on the main thread. You pass all the state that you computed in that thread. Chances are you computed that state in that thread too.

There are some optimizations regarding e.g. scrolling being computed in a different thread/process (still on the CPU) before compositing (on the GPU) but that is not a requirement for smooth animation.

Post reply on HN