Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Request for new functionality
View staffing
Description
Jetpack Compose version: 1.3.1
Description
Hello, every one,
The company I work for is using
Compose
. When measuring performance data, we found that the startup time of compose has some gaps compared with the way ofView
After read the compose's code, we found the way to reduce the startup time, we called
PreCompose
. it reduce startup frame time 25%(91ms->78m)Hope to discuss this solution with the official and integrate it into the mainline
PreCompose
issue
In the timeline, it is found that the most time-consuming parts are
compose
andapplychange
. it takes up most of the timeSolution
We found that
ComposeInit
can pre-executeAndroidView.preCompose()
in homePage, pre-executeComposeInit
AndroidView.applyChange
in this way, we could reduce startup frame time 25%(91ms->78m)
for detail, you can see commit at
usage demo
AbstractPreComposeView.kt
when composeView attach to window
composition?.applyComposeChange()
called