-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[MaterialContainerTransform] Huge delay running transition on 1.3.0-alpha01 #1415
Comments
Thanks for reporting the issue. I wonder if this is related to the elevation shadow support we added recently (1094b48). As a test, can you try setting |
No luck. Still takes a crazy-long time. From small to large, 1.2s. From large back to small, 5.3s. |
Can you create a GitHub repo with a minimal sample app that replicates the necessary parts of your setup and reproduces the issue when switching between 1.2.0-alpha06 and 1.3.0-alpha01? That way we can take a look and try to debug what is going on. |
Just tried producing a minimal sample but it doesn't repro the issue. Maybe it's something about the complexity of the views I'm trying to animate between (they are very complex in my real app's case)? I dunno, but I've already spent too much time on this, I'm just gonna stay on the working version for now. The sample I was working on: https://github.com/edenman/kmpPlayground FWIW: I added some logging to |
Hmm ok. Can you provide any more info about the complex views in your real app? If this is a real issue that could affect other developers it would be really helpful for us to figure it out while we're still in 1.2 beta, before we reach stable. Also, as you may have noticed, another big recent change was that we switched our default transitions from using |
|
Got a tip from @ricknout to try |
|
Hi, is the same issue still happening in |
@edenman are you able to test with 1.2.0-beta01 and I'm curious to see if this is an issue with the Framework Transitions library vs the AndroidX Transitions library. |
1.2.0-beta01 + platform.* = no animations. Maybe there's a problem with the magical way the transition is kicked off? |
Hmm that's strange because in 1.2.0-alpha06 our transitions were based on the Framework transition APIs, which seemed to be working for you before. When setting up 1.2.0-beta01 + platform.*, did you make sure that all of your related transition imports are using |
fwiw I was seeing a bunch of bugs on the previous version too, sometimes the new view wouldn't fully show, leading to the old view still being partially visible. Not sure if that's relevant. Anyway I'm punting on container transform entirely and going back to good-old slide left/right for now. |
Gotcha. Since we can't reproduce the problem in your sample app, another possibility is to use your actual app project and JitPack to bisect and find the MDC Android commit that causes the issue. If you're interested in trying this, you can add the following to your allprojects repo config:
And then instead of depending on
This commit should essentially be the same as using Obviously this will take some time so no worries if you are unable to do it, but I think it would be a definitive way to find the problematic commit, so I wanted to provide these instructions in case you are able to do it. |
I can confirm that there are issues with the In |
I've noticed another bug in
Here the In my case, |
I had this issue with FAB -> MaterialCardView. Setting shadows to off fixed it. |
I haven't tried that yet. Looks promising. For now, I'll stick with |
Spoke too soon, it is still sluggish. |
@AxelBlaz3 and @VincentJoshuaET, can you provide a minimal sample app that reproduces the lag using |
@dsn5ft I've created a sample repository as per your request. However, I can't reproduce the error precisely as it was on my personal project. But still, I can see a jank when I'm navigating from Home -> Detail screen for the first time (when using Also, note this, I've been using a low end device to perform such tests. Transitions run smoothly on a device with SDM 845 chipset. I have run these tests on a device having the following specs: Qualcomm Snapdragon 430 MSM8937 Chipset with 3 GB RAM (Device - Redmi 3S Prime) Here's the repo link: https://github.com/AxelBlaz3/Sample |
• Livedata (2.3.0-alpha04 -> 2.3.0-alpha05) • Jetpack Navigation (2.3.0-rc01 -> 2.3.0) • MDC (1.2.0-beta01 -> 1.2.0-alpha06) Had to downgrade MDC due to some issues Issue: material-components/material-components-android#1415 Signed-off-by: AxelBlaz3 <karthikgaddam4@gmail.com>
Thanks @AxelBlaz3! This should be very helpful. |
@dsn5ft I couldn't reproduce the issue properly. I mean, there's no jank in the sample app. Maybe because the data is static and not from server? My personal project app really lags for first few times and then everything will be fluid. What could be the possible reason behind that? Personal app uses the MVVM architecture with Repository pattern. Also, dagger 2 is used for DI. Views are similar to the sample app. But still, the sample app is fluid. However, I face lag in personal app only for first few times of navigation from Home -> Detail screen and then everything will be fluid. |
• Livedata (2.3.0-alpha04 -> 2.3.0-alpha05) • Jetpack Navigation (2.3.0-rc01 -> 2.3.0) • MDC (1.2.0-beta01 -> 1.2.0-alpha06) Had to downgrade MDC due to some issues Issue: material-components/material-components-android#1415 Signed-off-by: AxelBlaz3 <karthikgaddam4@gmail.com>
For me it's also a bit slower in new version, but I noticed views are getting mixed up during transition with |
@melihaksoy What kind of transition are you performing? Fragment to Fragment? View to View? |
@hunterstich It's view to view transition |
Are you setting a target on your |
Sorry for late response, I didn't add |
I'll close this issue for now due to it's a bit old and we haven't got further reports regarding this. Please feel free to reopen it if this is still happening. |
Description: 1.3.0-alpha01 causes MaterialContainerTransform to take way longer to run, and skip way more frames
Tried to update from 1.2.0-alpha06 but perf is a disaster.
Source code:
Here's how I'm launching the transition:
This shows up in logcat:
Android API version: 29
Material Library version: 1.3.0-alpha01
Device: Emulator Pixel 3a on API 29
The text was updated successfully, but these errors were encountered: