-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a warm-up API like flutter engine? #3141
Comments
Hi there, We're already discussing this topic internally, but anyway thanks for bumping this here. Related links regarding shader cache in flutter/skia: |
What about Impeller? https://docs.flutter.dev/perf/impeller Or isn't it abstracted in a way that it's usable outside of Flutter? |
Also as far as I am aware, for Android a different approach is being used. The UI is not drawn on a canvas but with Kotlin Compose instead, so it will be Views and not drawings on a canvas (my understanding at least, because I couldn't really find much documentation about this, and I'm a newbie here). On iOS skia is used to draw stuff on a canvas. Why not go for a more consistent approach and render elements using UIKit? That's what Reactive Native does. And - more similarly - that's what Redwood does. It seems like a more sensical approach to me. |
Compose is not responsible for rendering, Compose UI is. Composition is in fact a tree, built on top of nodes emitted by composable functions. In case of Compose UI it's a tree of LayoutNode containing layout, input events logic and aware of how to render itself into implementation of Building rendering on top of UIKit from Compose UI is non-trivial, because Canvas interface (which is tightly coupled with Compose UI expectations) sets up requirements, which are next to impossible to fulfil using UIKit capabilities (such as using arbitrary shader for specific geometry area during the rendering loop). Redwood uses a tree of own Platform abstracted node type |
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
I added a Compose screen to my ios app. When I enter the Compose screen for the first time, there will be some noticeable lag. Perhaps providing a warm-up API similar to flutter engine can solve this problem?
The text was updated successfully, but these errors were encountered: