You’re ignoring the OS doing other things as well before letting you draw to the screen.
This isn’t a video game where they’re direct drawing to a graphics context with exclusive use of the resources. They’re also setting up native widgets in the background, coordinating data downloads etc..
Unlike a video game where you control the rendering and scheduling to a greater degree, here they’re beholden to when the OS deems it ready to redraw or scheduling of background processes that may move their task to a lower priority.
Yes you can go fast if you don’t factor in the rest of the system, but they designed Lottie to play well within a retained mode UI setup, which has inherent overhead.
I do feel like video games definitely have it harder on this front in general, but tend to have loads of people focused on performance "at all costs", including generating a bunch of messy code to get something shippable.
I also think saying that a retained mode UI has inherent overhead is a bit odd. immediate mode UIs have to rebuild their entire draw graph on each frame! meanwhile retained mode UIs have a bunch of metadata letting them get nice optimization improvements. Translating an object means you might not even need to redraw it!
There is definitely a certain truth to the OS being able to just force you down to a lower priority, but I think we all know that iOS is pushing the top app to as high a priority as possible. Meanwhile the "inherent difficulties" with something like AirBnB (getting data over the wire) are definitely inherent but this is why we talk about placeholders and stuff like that yeah?
But if you're in the business of selling rentals it's hard to have so many engineers focused on the performance of the app (especially when you are in the act of being successful already)
With regards to retained mode overhead, I mean it across multiple forms not just the cost to redraw.
There’s the overhead of pushing updates to the UI layer from your app code, having it trigger an update, which in turn makes it check what other things have updated and what needs to redraw. UIKit is handling all that for you, but as a result you’re not getting full control of when you’re updating. You get pacing issues, where you can’t really guarantee you’re drawing at set intervals either which can lead to pacing stutters since you’re beholden to the apps event loop.
With an immediate mode UI in a game, yes there’s more cost to set up your draws, but you have more direct control of when everything will update because you’re handling the event loop more directly.
As for other priorities, I don’t mean just app priority. I mean intra-app priority. Lottie has to mix in with user code, the app it’s within might schedule a task with a higher QoS priority. It’s not just showing a fixed animation, it’s part of the app interaction model. So it’s easy to get into a situation where the rest of the app introduces stutters inadvertently.
Using CoreAnimation lets you sort of side step that discussion.
And yes I agree games have it harder over all because they have to handle everything. That wasn’t my point really. I think though that games have it easier when it comes to frame timing as a result of being able to control the entire event loop. So it’s easier for a game to reason about and guarantee smoothness of motion than it is for a framework that has to fit into arbitrary applications.
Interesting. Are videogames not beholden to the OS? Are all background processes suspended when SDL is running? Clearly videogames don't have native widgets in the background, nor do they ever "coordinate data downloads" (????)
What an absolutely braindead reply. A telltale sign a comment has almost no thought put into it: when you go into the user's post history and see the first page filled with comments written that very same day. Scatterbrained to the max.
Hey dude I'm gonna give you some unsolicited advice. Lay off the keyboard for a bit, would ya? Maybe go outside for a walk. You are spending way too much time writing comments on the internet. https://youtu.be/FmDFCKVnaRY?t=341
The irony that you’re the one who’s getting worked up about someone else’s internet activity while acting like I’m the one that needs more reality. You’re right your advice is unsolicited, so please kindly keep your issues to yourself.
I’d have been happy to discuss the nature of a UIKit and iOS based app cycle that affects these things, but I won’t with such an insufferable person who has nothing better to do than to contribute nothing other than their own anger out to the world.
I find topics interesting. I comment on said topics. That’s all that matters. Not your opinions. Not your weird hang ups.
It’s the holiday season. Go find someone to love you or share joy with instead of finding people to hate on on the internet. You clearly need it if this is the kind of stuff that gets you raging.
This isn’t a video game where they’re direct drawing to a graphics context with exclusive use of the resources. They’re also setting up native widgets in the background, coordinating data downloads etc..
Unlike a video game where you control the rendering and scheduling to a greater degree, here they’re beholden to when the OS deems it ready to redraw or scheduling of background processes that may move their task to a lower priority.
Yes you can go fast if you don’t factor in the rest of the system, but they designed Lottie to play well within a retained mode UI setup, which has inherent overhead.