I have developed a quite complex keyboard layout in Jetpack Compose. Initially, the layout works fine and animations run very smoothly when pressign the keys. Unfortunately, after a few recompositions due to events the animations and everything becomes very slow and laggy. I have tried to sample Jave Method calls and I can only see that some function take a lot longer than usual.
Edit: I have been able to isolate the issue. I have discovered that the performance issue only appears in multi module projects. When I put the exact same compose code in the root app
module the issue disappears.
I have created a project that reproduces the issue:
If you want to reproduce the issue in the multi module project you have to switch between the categories multiple times and then everything becomes very laggy
Note: I know Jetpack Compose is still in alpha and this issue might be a bug in Jetpack Compose. But I want to make sure that it's not a bug of my code or a general limitation of Compose
from Jetpack Compose Performance Issue that only occurs in multi module project
No comments:
Post a Comment